Search results for query: *

  1. G

    Can't get data to commit?

    Hi Francesco, I guess I do not understand what you are saying. You only need to commit if you use transactions in a database. What I understand is that you simply want to insert a row in your DB table. The code I gave you would do this. There is no need to use a data adapter, that is don't use...
  2. G

    To display month like 08.

    Yes, this are a backslash "\" followed by a slash "/". the slash is not allowed in the string.format method, so you need the backslash as an escape. String.Format("{0:MM\/dd\/yyyy}", Now) however, if you want to use a different separator, e.g. a "," you can use...
  3. G

    To display month like 08.

    Hi You can use the String.Format method to format a date, like so: Me.TextBoxDateOut.Text = string.Format("Todays date is: {0:MM\/dd\/yyyy}", now) 'this will show "08/24/2006" use String.Format("{0:MMMM\/dd\/yyyy}", now) "this will display "August/24/2006" Have fun G.
  4. G

    substring

    You are missing a parenthesis after Substring and you have to remove the comma. textOut.Append(Me.TextBoxIn.Text.Substring, idx, 1) textOut.Append(Me.TextBoxIn.Text.Substring( idx, 1)) G.
  5. G

    substring

    Well, you have to tell the substring method what part of the string you want. You do thins like so: me.txtbox1.text = "abcdefgh" dim StartPosition as int32 = 1 dim StringLength as int32 = 3 dim mySubString as string mySubString = me.txtbox1.text.substring(StartPosition, StringLength)...
  6. G

    Byte Array to String - Encoding question

    Hi, I believe what you are looking for is how to convert a string to a byte array and vice versa. Here is from string to byte array dim myString as string = "SomeText" dim myBytes() as byte = Convert.FromBase64String(myString) and here is from ByteArray to a string myString =...
  7. G

    can't use "=" sign in asp.net

    Take a look at the property "AutoPostBack" of the dropdownlistbox control. It has to be set to "TRUE". If this is not set, the selectedindex event will not fire. Lot's of little things to learn, I know. But it feels great when you get it working. Have fun and just let us know if your issues...
  8. G

    Can't get data to commit?

    Here is the code that will do what you want. You do not need a table adapter in this case, a simple command.executescalar will do. I tried to put enough comments into the code to explain each step. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
  9. G

    Problems with Insert Command

    Hi, I looked at you code again and it is much to complicated. There is no need to add SqlParameters to your command when you use a direct SqlQuery. You do this only when using stored procedures. So here is the code that does what you want: Private Sub Button1_Click(ByVal sender As...
  10. G

    can't use "=" sign in asp.net

    Remember, everything happens on the server. So when you click a button in the browser, it posts back to the server and your page is build again and the new page is send to the browser. So after clicking your button, you run through the Page_Load event again and there you populate the box1 a...
  11. G

    Problems with Insert Command

    youhave to add SqlParameters to the command.Parameter collection like so: command.Parameters.Add(New SqlParameter("@UserID", SqlDbType.NVarChar, 255, TextBox2.Text) Hope this helps. G.
  12. G

    can't use "=" sign in asp.net

    compare string with your code If box1.SelectedItem = "Car" Then actually compares an object with a string. you need to compare the text property to your string like so: If box1.SelectedItem.Text = "Car" Then The windows dropdownbox control uses the .Text property as a default, not so the...
Back
Top