Stored Procedure , database Saint Louis, United States
  • 12 years ago
    I have a form with a text box, button, and a datagridview. I want to populate the datagridview by running a stored procedure that uses the value in the textbox as a parameter executes the stored procedure and then populates the datagridview. I am new so as much info would be great. An example would be AWESOME.
  • 12 years ago
  • 12 years ago
    try this con=new sqlconnection( datasource=server1;internalcatalog=database1;intergrated security=true) cmd=new sqlcommand("UspDisplay",con) cmd.CommandType = CommandType.StoredProcedure con.Open() cmd.ExecuteNonQuery() con.Close() example sp: create procedure UspDisplay ( @id int, @Display bit output ) as begin select * from table where id=@id end
  • 11 years ago


Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Weeks of coding can save you hours of planning.”