T
Tonya
Hi,
I wanted to know how i can bind the results of my stored
procedure to a datagrid. all the SProc is doing is a
simple select of 6 columns from 2 tables.
Im not fully sure what to write as my book only gives 1
example. This is what i have attempted:
Dim Conn As New SqlConnection("initial
catalog=TestCaraDBmsde;integrated security=SSPI;persist
security info=False;workstation id=USER;packet size=4096")
Dim cmd2 As New SqlCommand("SPSelAllCaraDetails", Cn)
cmd2.CommandType = CommandType.StoredProcedure
Try
Conn.Open()
Dim reader As SqlDataReader = cmd2.ExecuteReader()
DGridCaraSel.SetDataBinding(reader.?????)
Catch ex As Exception
MsgBox(ex.Message)
Finally
Conn.Close()
End Try
End Sub
any help is appreciated
I wanted to know how i can bind the results of my stored
procedure to a datagrid. all the SProc is doing is a
simple select of 6 columns from 2 tables.
Im not fully sure what to write as my book only gives 1
example. This is what i have attempted:
Dim Conn As New SqlConnection("initial
catalog=TestCaraDBmsde;integrated security=SSPI;persist
security info=False;workstation id=USER;packet size=4096")
Dim cmd2 As New SqlCommand("SPSelAllCaraDetails", Cn)
cmd2.CommandType = CommandType.StoredProcedure
Try
Conn.Open()
Dim reader As SqlDataReader = cmd2.ExecuteReader()
DGridCaraSel.SetDataBinding(reader.?????)
Catch ex As Exception
MsgBox(ex.Message)
Finally
Conn.Close()
End Try
End Sub
any help is appreciated