Click here to Skip to main content
15,904,348 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi can you help me out on how i should start out with this?

so i have a textbox wherein i will type a code and it should search that code under "Code" column on mysql database and return the text under "item" column corresponding on the code entered.

What I have tried:

I tried starting this but im not sure how to continue it

MysqlConn = New MySqlConnection
        Dim Reader As MySqlDataReader

        MysqlConn.ConnectionString = "xxxxxx; user id=xxxxxx; password=xxxxxx; database=xxxxxx"

        Try
            MysqlConn.Open()
            Dim trial As String
            trial = "select * from sql12305518.Office_Items where ALP='" & Label3.Text & "' "
            COMMAND = New MySqlCommand(trial, MysqlConn)
            Reader = COMMAND.ExecuteReader
Posted
Updated 15-Nov-20 17:28pm
Comments

1 solution

While reader.Read
      text1.text = Reader.GetString(0)
End While
reader.Close()
 
Share this answer
 
Comments
Member 14122214 16-Nov-20 0:29am    
you are a genius kgmmurugesh!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900