Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL and Web interaction

Status
Not open for further replies.

tonyta

Technical User
Joined
Sep 20, 2001
Messages
2
Location
AU
Hi all,

I have just started with SQL and would like to know if anyone knows how I can create a stored procedure in MS-SQL that uses a HTML input box as its Parameter. For example I'd like to be able to say have an input box the asks for 'name' and on submit call to MS-SQl stored procedure using 'name' as the variable.

Thanks
 

There are several ways to access and run SQL procedures from web pages. How are you developing the web pages? Does your development tool provide database connectivity? Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
I am using ASP to develop the Web pages using ultradev. But I am familiar with ASP and javascripting.

Thanks
 

You can make ADO conections with ASP. I believe Ultradev is database oriented so it should have all the information you need to make the connection and call the stored procedure. Check forum770 for help with Ultradev.

SQL server Stored Procedures with parameters are essentially executed the same way whether from a web page, VB program or other client.

Example of stored procedure with parameter:

Create Procedure FindEmployeeRecByName
@name varchar(30) As

/* Add wildcard character for search */
Set @name=@name + '%'

Select * From EmpTable
Where EmpName Like @name

Execute stored procedure:

Exec FindEmployeeRecByName 'smith' Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top