Click here to Skip to main content
15,881,455 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
In the program i am creating, all the stored procedure's parameters are in a datagridview control (for one specific stored procedure). Columns are: Parameter Name, Parameter Type and Length of Type. There is one more column named "Enter Value". In this column the user enters data appropriate to the parameter and clicks the Run Procedure button. Once the button is clicked the program must use the "Enter Value" column's value to execute the stored procedure.

Using the data entered into the "Enter Value" column, the program executes the stored procedure.

I'm not sure how to retrieve the information from the datagridview control.

please help.
Posted
Comments
taha bahraminezhad Jooneghani 3-Jun-12 17:20pm    
did you use a table with primary key for store procedure?
D3m0n1CMoNkEy 4-Jun-12 9:12am    
unknown...When the program starts the database name is unknown, procedures is unknown and parameters is unknown. the user selects the database name in the program, from there the stored procedures for that database will show, and then the parameters for the stored procedure the user has selected

1 solution

So you know how to fill a

C#
DataGridView mDgv;

// Fill mDgv
.
.

// 
int i=3;
// get a value from mDgv, column "MyFill", row 3
int MyFill=mDgv.Rows[i].Cells["MyFill"].Value;


Of course you can loop to get many rows and you can get whatever columns you have.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900