callsupport1
Programmer
Hi can you please help a novice. I am trying to learn ADO.NET and have got this far:-
Dim connectionString As String = _
"Data Source=(local);Initial Catalog=Sage200_DemoData;" _
& "Integrated Security=true"
' Provide the query string with a parameter placeholder.
Dim queryString As String = _
"SELECT * from dbo.SLCustomerAccount;"
' Specify the parameter value.
Dim paramValue As Integer = 5
' Create and open the connection in a using block. This
' ensures that all resources will be closed and disposed
' when the code exits.
Using connection As New SqlConnection(connectionString)
' Create the Command and Parameter objects.
Dim command As New SqlCommand(queryString, connection)
i would like to asign a fields contence to a text box but don't know what to do next. I thought it might be something like :-
textbox1.text = Command.field"name".value
please can you help.
Thanks
Stephen
Dim connectionString As String = _
"Data Source=(local);Initial Catalog=Sage200_DemoData;" _
& "Integrated Security=true"
' Provide the query string with a parameter placeholder.
Dim queryString As String = _
"SELECT * from dbo.SLCustomerAccount;"
' Specify the parameter value.
Dim paramValue As Integer = 5
' Create and open the connection in a using block. This
' ensures that all resources will be closed and disposed
' when the code exits.
Using connection As New SqlConnection(connectionString)
' Create the Command and Parameter objects.
Dim command As New SqlCommand(queryString, connection)
i would like to asign a fields contence to a text box but don't know what to do next. I thought it might be something like :-
textbox1.text = Command.field"name".value
please can you help.
Thanks
Stephen