Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parameterized Query in Classic ASP/SQL Server

3 views
Skip to first unread message

corey....@gmail.com

unread,
Sep 12, 2006, 3:35:36 PM9/12/06
to
Is there a way to do a parameterized query in Classic ASP using Classic
ADO (not .NET) and SQL Server?

Let's say I have a web page that allows a user to enter a first name
and a last name that will get inserted into the database. The usual
way to do this would be to build an SQL statement by concatenating the
entered values with the rest of the statement - like this:

strSQL = "INSERT myTable (fname, lname) VALUES ('" & txtFName & "', '"
& txtLName & "')"

However, is there a way using the ADO command object and parameters? I
saw an example in ADO.NET, but I have not seen an example using regular
ADO. I'm not talking about stored procedures.

Thanks,
Corey

0 new messages