0

Dear Sir,
I need information about store procedure in SQL and how can i access textbox values into store procedure.

and connection string for remote server (sql server 2005 installed on server)

pardeep

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by G_Waddell
1

Hi

These sites will show you how to use SQL server and Stored Procedures:
http://www.microsoft.com/sqlserver
http://www.functionx.com/sqlserver/

This Site will show you how to connect:
http://www.connectionstrings.com

To put values in to textboxes it is the same as if you had created the SQL query on the fly:

Dim mCommand As SqlCommand = New SqlCommand
 with mCommand
    .CommandText = "MyProcedureName" 'instead of "SELECT * From MyTable etc.
    .CommandType = CommandType.StoredProcedure 'Instead of Text
    'if I want to pass data in use parameters
    .Parameters.AddWithValue("@MyParam", Value)
 end with
 textbox1.text = mCommand.ExecuteScalar() 'assuming a scalar value is returned
Votes + Comments
Helpful.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.