Hi everyone,
Thanks in advance for trying to help me out.
I have a SQLDataSource which is running a dynamically generated SQL2005 stored procedure. (That is, the stored procedure creates a varchar string and ends with an exec(@string) command.) The datasource is used by a gridview to display the result. The stored procedure gets a number of parameters which set bit values for "use query criteria 1" , "use query criteria 2" etc which are all tied to Visual Studio check boxes. (The result is-- will be-- that the user can select one or more check boxes and filter which records are returned.)
The stored procedure runs perfectly when I execute it on the database side, as well as when I click "Test Query" in the SQLDataSource configuration wizard. The columns are set properly, and everything looks to be fine right up until when I build it.
My problem is the gridview just doesn't show up. No header, no data-- nothing.
I admit I'm very perplexed. Does anyone have any idea what could cause this?
Other potentially useful info:
I don't get any build errors or SQL exceptions.
If instead of ending the stored procedure with exec(@string) I use SELECT @string, and copy/paste the output into the Select statement of the datasource, it runs fine.
Also, stepping through the .cs file shows that the SqlDataSource_S elected() is never called. Any idea why this would be?
Thanks in advance for your help!
Thanks in advance for trying to help me out.
I have a SQLDataSource which is running a dynamically generated SQL2005 stored procedure. (That is, the stored procedure creates a varchar string and ends with an exec(@string) command.) The datasource is used by a gridview to display the result. The stored procedure gets a number of parameters which set bit values for "use query criteria 1" , "use query criteria 2" etc which are all tied to Visual Studio check boxes. (The result is-- will be-- that the user can select one or more check boxes and filter which records are returned.)
The stored procedure runs perfectly when I execute it on the database side, as well as when I click "Test Query" in the SQLDataSource configuration wizard. The columns are set properly, and everything looks to be fine right up until when I build it.
My problem is the gridview just doesn't show up. No header, no data-- nothing.
I admit I'm very perplexed. Does anyone have any idea what could cause this?
Other potentially useful info:
I don't get any build errors or SQL exceptions.
If instead of ending the stored procedure with exec(@string) I use SELECT @string, and copy/paste the output into the Select statement of the datasource, it runs fine.
Also, stepping through the .cs file shows that the SqlDataSource_S elected() is never called. Any idea why this would be?
Thanks in advance for your help!
Comment