S
shapper
Hello,
I am working on an Asp.Net 2.0 web site.
In have a GridView which I want to fill using a DataSource Function.
What data type should I use to how to get the data from the database?
Here is my DataSource function with "??????" on the 2 places where I am
having problems.
Function DataSource() As ??????
' Define connection
Dim connection As New
SqlClient.SqlConnection("MyConnectionString")
' Define command
Dim command As New SqlClient.SqlCommand
With command
.CommandText = "MyCommand"
.Connection = connection
.CommandType = CommandType.StoredProcedure
End With
' Execute the command
connection.Open()
???????????????
connection.Close()
End Function
Thanks,
Miguel
I am working on an Asp.Net 2.0 web site.
In have a GridView which I want to fill using a DataSource Function.
What data type should I use to how to get the data from the database?
Here is my DataSource function with "??????" on the 2 places where I am
having problems.
Function DataSource() As ??????
' Define connection
Dim connection As New
SqlClient.SqlConnection("MyConnectionString")
' Define command
Dim command As New SqlClient.SqlCommand
With command
.CommandText = "MyCommand"
.Connection = connection
.CommandType = CommandType.StoredProcedure
End With
' Execute the command
connection.Open()
???????????????
connection.Close()
End Function
Thanks,
Miguel