rowek
asked on
Bind resultset f/SP gridview
I am attempting to bind the resultset of a stored procedure to a GridView in ASP.NET. However, the resultset does not appear to be binding. I've stepped through my code and everything looks to be working just fine: my connection isn't getting lost and my parameters are passing through fine. I'm not even getting an error message! I'm just not getting a result set returned. When I add a breakpoint and inspect the dataset object in the debugger, it is empty.
I have run the stored procedure in SSMS and have verified that I SHOULD be getting a result set returned. Below are my stored procedure and some of the code from my app.
Please tell me what I am doing wrong. Thanks.
HelpWithSPandGridView-ASP.txt
HelpWithSPandGridView-SP.txt
HelpWithSPandGridView-VB.txt
I have run the stored procedure in SSMS and have verified that I SHOULD be getting a result set returned. Below are my stored procedure and some of the code from my app.
Please tell me what I am doing wrong. Thanks.
HelpWithSPandGridView-ASP.txt
HelpWithSPandGridView-SP.txt
HelpWithSPandGridView-VB.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Once we took out the wildcard we got data from our Stored Procedure.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-3
You could try setting this value to "true" and then see if you get columns created with rows populated. After that, create this event in the code and work with it to assign the column values per row as described in the MSDN article.