am using the below code to execute a normal statement, but now want to turn it into a stored procedure. I ahve written the syored procedure 'sp_showTasks' and need to pass a parameter to it. How do I convert the below code to work with the SP??
Dim nwindConn As SqlConnection = New SqlConnection(SQLCon)
nwindConn.Open()
Dim myCMD As SqlCommand = New SqlCommand("SELECT * FROM todo WHERE " & sqlStr & "", nwindConn)
Dim todo As SqlDataReader = myCMD.ExecuteReader()
Dim i = 0
Do While todo.Read()
loop
....................
Cheers
Tim


Reply With Quote