vivian_870215
asked on
visual basic.net- How to use My SQL display data to text box?
Hi, i am beginner.
How to use My SQL display data to text box?
data reader???
recordset???
Pls, i need help !
Thanks
How to use My SQL display data to text box?
data reader???
recordset???
Pls, i need help !
Thanks
What do you return from sql ? One field (one record), multiple fields (one record), multiple fields & multiple records... ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Anyway thanks alot :D
Dim strConnectionString As String = "connetion string here"
Dim cnn As New SqlConnection(strConnectio nString)
Dim cmd As SqlClient.SqlCommand = New SqlClient.SqlCommand("SELE CT * FROM table ", cnn)
cmd.CommandType = CommandType.Text
Dim dacmd As New SqlClient.SqlDataAdapter(c md)
Dim dscmd As New DataSet
dacmd.Fill(dscmd)
txtLastName.Text = dscmd.Tables(0).Rows(0).It em("FieldN ame")
Dim cnn As New SqlConnection(strConnectio
Dim cmd As SqlClient.SqlCommand = New SqlClient.SqlCommand("SELE
cmd.CommandType = CommandType.Text
Dim dacmd As New SqlClient.SqlDataAdapter(c
Dim dscmd As New DataSet
dacmd.Fill(dscmd)
txtLastName.Text = dscmd.Tables(0).Rows(0).It