473,511 Members | 16,260 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stored procedure in VB binding source?

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

Apr 2 '06 #1
2 2474

<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>
"Joe Befumo" <jo*@befumo.com> wrote in message news:44***********************@news.newsdemon.com. ..
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

Apr 2 '06 #2
thanks a bunch -- I'll give that a try.

Joe
"Alexey Smirnov" <removeit.hello_at_smalig.com> wrote in message news:OF**************@TK2MSFTNGP12.phx.gbl...

<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>
"Joe Befumo" <jo*@befumo.com> wrote in message news:44***********************@news.newsdemon.com. ..
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

Apr 3 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
22092
by: dinesh prasad | last post by:
I'm trying to use a servlet to process a form, then send that data to an SQL server stored procedure. I'm using the WebLogic 8 App. server. I am able to retrieve database information, so I know my...
0
6678
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
8
2012
by: John Reynolds | last post by:
Hi all, I have a software product that includes stored procedures using sql. Is there a way to obsfucate or otherwise NOT deliver readable source to a stored procedure? I don't really want to...
0
1151
by: Sal | last post by:
I just had a C# conversion project thrown at me, and must bind several text boxes on a form to different columns from a table. We have to use stored procedures that are called through data layer...
7
3430
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function...
2
4080
by: jed | last post by:
I have created this example in sqlexpress ALTER PROCEDURE . @annualtax FLOAT AS BEGIN SELECT begin1,end1,deductedamount,pecentageextra FROM tax
3
2560
by: Homer J. Simpson | last post by:
I have the following stored procedure: ALTER PROCEDURE . AS BEGIN SET NOCOUNT ON; SELECT COUNT(*) FROM QUICKNOTES END ....and the following data source in my .aspx file:
0
3154
by: SOI_0152 | last post by:
Hi all! Happy New Year 2008. Il hope it will bring you love and happyness I'm new on this forum. I wrote a stored procedure on mainframe using DB2 7.1.1 and IBM language c. Everything works...
3
2811
by: FrustratedNoob | last post by:
I've got a database that I've been working on for over a year and a half but I've just recently finished the back end to the point of feeling comfortable with starting on a front end. So while...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7508
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
446
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.