|
Hi,
I've a Form in page 1.asp and am accepting a 'string' variable (Name) from the user through METHOD=GET.
In page 2.asp, I use this string variable in a SQL Select statement as follows:
set rs= conn.execute ("select * from table where =" & request.QueryString("Name")
but, I get an error message: Too few parameters. Expected 1.
However, when I accept and use a 'numeric' variable I can execute this Select statement successfully.
What am I doing wrong? Pls help. Thanks.
|
|
|
shouldn't your query have something on the left hand side of the equal sign.
i.e.
set rs= conn.execute ("select * from table where name = " & request.QueryString("Name") )
semper fi...
|
|
|
...oops, sorry I missed typing it here, though I had it in the original statement. Anyways, I figured it out:
set rs = conn.execute("select * from table where name = '" & request.querystring("name") & "'")
it worked. Thanks.
|
|
|
|
|
|
|
// |