none
return a result query from mysql RRS feed

  • Question

  • hi i have the following code




    Dim myConnString As String = "server=localhost" _
           & ";" & "user id=mihai" & _
           ";" & "password=mihai" & _
           ";" & "database=data entry"

            Dim conn As New MySqlConnection
            Dim myCommand As New MySqlCommand

            conn.ConnectionString = myConnString

            myCommand.Connection = conn

            myCommand.CommandText = "SELECT mesaj from cthru where mesaj=?nume"

            myCommand.Parameters.AddWithValue("?nume", TextBox1.Text)


            Try

                conn.Open()
                myCommand.ExecuteNonQuery()



    -----------------------

    and now i would like to transfer the result of the code (wich will be a number) to a textbox for example in VB, i use mysqldataadapter ?

    thank you
    Monday, September 10, 2007 9:50 AM