Closed Thread Icon

Topic awaiting preservation: Is this sql statement wrong???(vbscript) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12946" title="Pages that link to Topic awaiting preservation: Is this sql statement wrong???(vbscript) (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Is this sql statement wrong???(vbscript) <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 10-22-2003 05:08

Hi, guys.
Is this SQL statement wrong?
I keep recieving syntax error.
But I am positive it is right.

code:
sql="INSERT INTO login (name,password) VALUES "
sql=sql & "('" & name & "','" & password & "')"



Hiroki Kozai

rickindy
Nervous Wreck (II) Inmate

From: Indianapolis, In USA
Insane since: Jan 2002

posted posted 10-22-2003 14:54

Not a VBScript person, but the first thing to try would be to write a straight SQL statement without trying to use any of the variables you have. If that works, then there is possibly something amiss with your variables.

Check and see if the values you are trying to insert are actually there and that they don't have any quotes or other special characters in them..

You might also have the script display the SQL after it has constructed it just to make sure that what is happening is what you expected.

If the engine says there is a syntax error, you can be pretty sure that you have a syntax error.



Few problems in life can't be solved by chocolate

« BackwardsOnwards »

Show Forum Drop Down Menu