[thelist] More ASP help

Salvatore Palmisano spalmisano at usaiss.com
Tue Mar 6 12:22:41 CST 2001


Ok lets work it from a different angle.  What do you want to SQL string to
look like after the session variables are filled in?
Something like "SELECT * FROM West WHERE Handle='handlevalue'" ?
If so, you're missing the single quotes required around the handlevalue
variable.

When you include the SQL string in the .Open statement, you are more apt to
end up with an invalid SQL string, and its generally harder to debug.
For instance, your SQL string in that case is:
SELECT * FROM West where Handle=

And thats it.  The second double quote ends the string.  The session
variable's contents gets appended to the .Open statement, but not in the way
you're looking for.

Try this:
strSQL = "SELECT * FROM West where Handle='" & Session("handle") & "'"
rsWest.open strSQL, connection, 2,3

--Salvatore Palmisano
Chief Information Officer
International Security Solutions, Inc.
spalmisano at usaiss.com

-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Daniel McMurray
Sent: Tuesday, March 06, 2001 1:08 PM
To: thelist at lists.evolt.org
Subject: RE: [thelist] More ASP help


I got the SELECT * FROM code from the local ASP junkie, but it
unfortunately didn't work. The error I included with my post was the least
harmful error I got after working with the code for a bit.  I also tried
what was in the Wrox Beginning ASP book, which was only marginally
different.  It had pretty much the same effect.

As for the connection, 2, 3 bit.... I get the same error if I remove the
2,3 part, and I get an error stating "Operation is not allowed on an
object referencing a closed or invalid connection" if I remove the
Connection part as well.





More information about the thelist mailing list