Datasource ?

I have a Datasource that's bound to an SQL Server stored procedure. This sp needs to be passed a paramater. How would I have the DS pass it the paramater?
Who is Participating?
Bob LearnedCommented:
Here is a sample:

  Dim conn As New SqlConnection(connectionString)
  Dim cmd As New SqlCommand("sp_getlist", conn)
  cmd.CommandType = CommandType.StoredProcedure
  cmd.Parameters.Add("ID", SqlDbType.Int).Value = id
  Dim reader As SqlDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)

szx248Author Commented:
>Dim conn As New SqlConnection(connectionString)

what is the connectionString? I am getting an error on this which I guess means that I have to set it. But how?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.