Closed Thread Icon

Topic awaiting preservation: SQL problem ( ASP ) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12957" title="Pages that link to Topic awaiting preservation: SQL problem ( ASP ) (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: SQL problem ( ASP ) <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 10-30-2003 00:11

Hi, guys. How are you?
I am having SQL problem. Please help me.

code:
If Not IsEmpty(Request("state")) Then

sql = sql & " WHERE Tblstate.Colstate =" Request("state")""

End If



I have an existing sql before this code. I want to add more sql statement using above code. But doesnot work.
Actually I want to swap value according to user choice from form. Then I want to pass user choice to sql statement.
Do you know what I mean???
Help.

Hiroki Kozai

Rhino
Bipolar (III) Inmate

From: New Jersey, USA
Insane since: Jul 2003

posted posted 10-30-2003 00:26


sql = sql & " Where Tblstate.Colstate = '" & Request("state") & "'"

I enclosed the request value in single quotes because I assumed it will be a string. If not, remove the single quotes.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 10-30-2003 00:40

Thank you very much.
It works perfectly.
Cheers.

Hiroki Kozai

« BackwardsOnwards »

Show Forum Drop Down Menu