How can I bind data to a database
-
I want to bind data in a Select Statement in a stored procedure in SQL Server 2005 to a GridView in Visual Basic 2005. I set the DataSourceID of the GridView to the Stored Procedure and in runtime Bind the Data with DataBind Method. But it dose not work. Please help me.
-
I want to bind data in a Select Statement in a stored procedure in SQL Server 2005 to a GridView in Visual Basic 2005. I set the DataSourceID of the GridView to the Stored Procedure and in runtime Bind the Data with DataBind Method. But it dose not work. Please help me.
It sounds like you have some misconceptions about how all this works. Post the code you're using to get the data and bind the grid and we'll see if we can straighten it out. Is this an ASP.NET app or Windows Forms? You don't bind to a stored procedure. You call a stored procedure to return the records you want. The records end up in either a DataTable or some other bindable source. You then bind the grid to that record set.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
It sounds like you have some misconceptions about how all this works. Post the code you're using to get the data and bind the grid and we'll see if we can straighten it out. Is this an ASP.NET app or Windows Forms? You don't bind to a stored procedure. You call a stored procedure to return the records you want. The records end up in either a DataTable or some other bindable source. You then bind the grid to that record set.
Dave Kreskowiak Microsoft MVP - Visual Basic
-
I wrote this code and in .aspx.vb i write this code Protected Sub Page_Load(Parameters) GridView1.DataBind End Sub
What code? This is HTML. There's nothing here that calls any kind of database.
Dave Kreskowiak Microsoft MVP - Visual Basic