[thelist] Was ASP Question now It still doesn't work
Glen Burnett
thelist at lists.evolt.org
Fri Oct 11 14:48:01 2002
Is the statement where you store the sql query into the string variable on
one line in your code? If not either move it onto one line or use the line
continuation character ("_") as shown below:
----------------
sql = "INSERT INTO stuff(PostedBy,IpAddr,Day,Message) VALUES " & _
"('"&straddr&"','"&strip&"','"&strday&"','"&strmsg&"')"
Also, do the straddr or strmsg variables contain single quotes in them? If
so you will need to escape them using the replace function otherwise the
quote in the value will terminate the string right where you don't want it
to.
strmsg = Replace(strmsg, "'", "''")
Two single quotes in the value will give you one single quote in the
database field. (Well, it does in Sql Server, I assume it works the same
for Access.)
Good luck,
Glen
-----Original Message-----
From: thelist-admin@lists.evolt.org
[mailto:thelist-admin@lists.evolt.org]On Behalf Of Michael CAREY
Sent: Saturday, 12 October 2002 5:32 a.m.
To: thelist@lists.evolt.org
Subject: [thelist] Was ASP Question now It still doesn't work
--
[ Picked text/plain from multipart/alternative ]
I was trying to insert a date value but i am told that it is an unterminated
string constant, with reference point to the word value.
Please help again!
BTW,
Thx 4 all the help last time
Regards,
Giles
giles@elementdesign.biz
--
--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !