stored procedure in VB binding source?

  • Thread starter Thread starter Joe Befumo
  • Start date Start date
J

Joe Befumo

I'm using a datagrid, and have it get its data from a stored procedure. I've set up a table adaptor and related binding source pointing to my stored procedure, but can't figure out how to pass a parameter to the SP through the binding source. (I know I could do it by setting up connection and command objects, building the"Execute" sql string, etc., but I'm already using that grid to get data from a query using the binding source, and would like to be consistent.) Thanks.

Joe
 
<asp:SqlDataSource
id="SqlDataSource1"
runat="server"
DataSourceMode="DataReader"
ConnectionString="......."
SelectCommand="MyProc param1, param2">
</asp:SqlDataSource>

<asp:GridView
id="GridView1"
runat="server"
DataSourceID="SqlDataSource1">
</asp:GridView>


I'm using a datagrid, and have it get its data from a stored procedure. I've set up a table adaptor and related binding source pointing to my stored procedure, but can't figure out how to pass a parameter to the SP through the binding source. (I know I could do it by setting up connection and command objects, building the"Execute" sql string, etc., but I'm already using that grid to get data from a query using the binding source, and would like to be consistent.) Thanks.

Joe
 
thanks a bunch -- I'll give that a try.

Joe
"Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message
<asp:SqlDataSource
id="SqlDataSource1"
runat="server"
DataSourceMode="DataReader"
ConnectionString="......."
SelectCommand="MyProc param1, param2">
</asp:SqlDataSource>

<asp:GridView
id="GridView1"
runat="server"
DataSourceID="SqlDataSource1">
</asp:GridView>


I'm using a datagrid, and have it get its data from a stored procedure. I've set up a table adaptor and related binding source pointing to my stored procedure, but can't figure out how to pass a parameter to the SP through the binding source. (I know I could do it by setting up connection and command objects, building the"Execute" sql string, etc., but I'm already using that grid to get data from a query using the binding source, and would like to be consistent.) Thanks.

Joe
 
Back
Top