Try this.....
' Open db connection
Dim cnn As New SqlConnection(CONNECTION_STRING)
cnn.Open()
' Set command for the stored procedure
Dim cmd As New SqlCommand
With cmd
..CommandType = CommandType.StoredProcedure
..Connection = cnn
..CommandText = "CustOrderHist"
..Parameters.Add("@CustomerID", "ALFKI")
End With
' Create data adapter
Dim da As New SqlDataAdapter(cmd)
' Fill dataset from adapter
Dim ds As New DataSet
da.Fill(ds)
Hope this helps.
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
It goes a bit like this . . .
Dim cmd As New OleDb.OleDbCommand
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "MyStoredProcedure"
cmd.Connection = MyConnection
--
OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me
Time flies when you don't know what you're doing
"Nikolay Petrov" <jo******@mail.bg> wrote in message
news:eA**************@TK2MSFTNGP09.phx.gbl... How to fill DataSet from stored procedure?