S
Schapopa
Hello,
I have form where I want to display data from one record. So I created
stored procedure with parameter and I populated some dropdown boxes
with data, and now I would like to display that record in the
textboxes and combo boxes.
So I have data conection, data adapter and query with parameter.
How do I bind this to textboxes and dropdown boxes.
textbox.text = ?? I guess what I cannot find is how to point to
specific field in the dataset.
Below is piece of code that I am using for dataadapter and dataset:
conn.Open()
Dim daCategory As New SqlDataAdapter("sp_task", conn)
daCategory.SelectCommand.CommandType =
CommandType.StoredProcedure
Dim IDtask As New SqlParameter("@IDTask",
System.Data.SqlDbType.NVarChar)
IDtask.Direction = ParameterDirection.Input
IDtask.Value = Request.QueryString("IDTAsk")
daCategory.SelectCommand.Parameters.Add(IDtask)
Dim dsZadanie As New DataSet
daCategory.Fill(dsTask, "Task")
Thank's
Arek
I have form where I want to display data from one record. So I created
stored procedure with parameter and I populated some dropdown boxes
with data, and now I would like to display that record in the
textboxes and combo boxes.
So I have data conection, data adapter and query with parameter.
How do I bind this to textboxes and dropdown boxes.
textbox.text = ?? I guess what I cannot find is how to point to
specific field in the dataset.
Below is piece of code that I am using for dataadapter and dataset:
conn.Open()
Dim daCategory As New SqlDataAdapter("sp_task", conn)
daCategory.SelectCommand.CommandType =
CommandType.StoredProcedure
Dim IDtask As New SqlParameter("@IDTask",
System.Data.SqlDbType.NVarChar)
IDtask.Direction = ParameterDirection.Input
IDtask.Value = Request.QueryString("IDTAsk")
daCategory.SelectCommand.Parameters.Add(IDtask)
Dim dsZadanie As New DataSet
daCategory.Fill(dsTask, "Task")
Thank's
Arek