Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Variable is being passed wrong
07-22-2004, 04:13 PM #1
- Join Date
- Nov 2002
- Thanked 4 Times in 4 Posts
Variable is being passed wrong RESOLVED (nevermind).
I am opening an asp and passing a record ID with the request. When it gets to the SQL statement the variable has extra quotes around it causing it not to be in the recordset.
http//blah blah blah/debug.asp?EvtID="NKA82947222004"
strEvtID = request.querystring("EvtID") response.write "In program<br>" if strEvtID <> "" then 'See if it is a draft by looking for this in the drafts table. strSQL = "SELECT * FROM Drafts WHERE EventID='" & strEvtID & "'" vSQL = "Select * from qryApprovers where UserID='" & strMyUID & "';" Response.write "strSQL = " & strSQL & "<br>" Response.write "vSQL = " & vSQL & "<br>"
In the browser this is what I get;
strSQL = SELECT * FROM Drafts WHERE EventID='"NKA8294Jul222004"'
vSQL = Select * from qryApprovers where UserID='NKA8294';
When I removed the quotes from the query string I got another error, fixed that error and the call ran right without the quotes. Just overloked stuff. Thanks.
Thanks for the help,
Last edited by ScottInTexas; 07-22-2004 at 05:17 PM. Reason: Resolved The ProblemScott Stewart
Always happy to learn from pros.