I don't do much work in .Net, but I am expecting to develop and maintain a small in house application. I got some stuff done, but I cannot get one part to work right. I am trying to figure out how to invoke a stored procedure and load the return data set to text boxes. I tried to Google it, but I am not finding what I am looking for. I think it is because I am not using the correct search word.
Any help would appreciated. Thanks
Here is what I have so far.
Any help would appreciated. Thanks
Here is what I have so far.
VB.NET:
Dim Conn As SqlConnection = New SqlConnection(db.DatabaseConnStr)
Dim cmd As New SqlCommand
Dim ds As New DataSet
Dim da As New SqlDataAdapter
Try
Conn.Open()
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = Conn
cmd.Parameters.AddWithValue("@ID", ID)
' cmd.CommandText = cmdStr
Dim Adapter As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim DataSet As DataSet = New DataSet("name")
P.lastName = DataSet
Catch ex As Exception
End Try