How to pass a store procedure and a variable to a datagrid

125 pts.
Tags:
GridView Control
Stored Procedure variables
I am a newbie when it comes to passing parameters to a control. I am programing in VS 2008 using VB as the language. The grid is in an ASP.Net (3.5) page 

I have set up a store proceduer in SQL Server 2005 as follows:

CREATE PROCEDURE

 

usp_selEmpSSN--Transfer all records from tbl_CL with the EmpPin

@CL_EmpPIN

CHAR AS

BEGIN



 

SELECT CL_DOE, CL_WC, CL_EmPIN, CL_Active  



FROM dbo.tbl_CL  



WHERE CL_Active=0 AND CL_EmpPIN=@CL_EmPIN

I know how to tell the GridView to use the store procedure but where do I pass the value for @CL_EmpPin?

Any help will be greatly appreciated!





Software/Hardware used:
Visual Studio 2008 language VB and ASP.NET(3.5)

Answer Wiki

Thanks. We'll let you know when a new response is added.

From the ‘GridView Tasks’ menu, select the ‘Configure Data Source’ option, and click ‘next’ until you find the window where you define if you are going to use an SQL statement or a stored procedure.

If you select a stored procedure, and it has parameters, when you click ‘next’ you should see a page where the parameters for the stored procedure are defined. You should only need to select the desired parameter, and select the appropriate option from the “Parameter Source” list box.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following