[thelist] SQL text form box

Daniel S. O'Shea doshea at surfree.com
Wed Jun 27 20:07:56 CDT 2001


Joshua, if you're not a guru, you're damn close. It worked. Thanks.

Matthias and Lon, thanks for the response also.
Lon, your code still returned an error message, but I have a feeling if I
tweaked it a bit, it'd work as your statement was closer to what WROX had.

You asked the question, "Do you see why?" and I'd like to give the question
a whirl since we're all here to learn...

I assume the quotes were needed so the program language would be recognized
by SQL?? In this case ASP, but I'm assuming any other programming language
in a SQL statement would need the quotes also. As for the ampersand, it is
used to 'join' the WHERE statement as a whole. Oh, and the quotes and
ampersand were needed due to the input of the variables, which is ASP code.

Is this correct??

Dan O.

> The only thing that glares at me (I'm no ASP guru) is that the variable
> references to varLastName and varFirstName within the actual sql statement
> need to be pulled out from the string so they can be parsed.

> Thus
> :   "WHERE (((People.PeopleNameLast)='varLastName') AND
> : ((People.PeopleNameFirst)='varFirstName'));"
>
> becomes:
>
> :   "WHERE (((People.PeopleNameLast)='" & varLastName & "') AND
> : ((People.PeopleNameFirst)='" & varFirstName &"'));"





More information about the thelist mailing list