|
|
 |
RE: FN-FORUM access/asp
date posted 13th January 2003 16:56
I think "password" is a reserved word, try changing the column name to
something else (pword?)
Mike
http://www.denialdesign.com
-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] Behalf Of David Eckersall
Sent: 13 January 2003 16:41
To: [EMAIL REMOVED]
Subject: FN-FORUM access/asp
alas my current project utilises access and i've just come a cropper on what
should be a doddle.
the function below is generating the error "Syntax error in INSERT INTO
statement"
function regUser(fname, email, pwd)
regUser=""
set myConn=getConn(application("strUDL"))
myConn.open
set objRS=myConn.execute("SELECT COUNT(email_address) AS [eCounter]
FROM USERS WHERE email_address='"&email&"'")
eCounter=objRS("eCounter")
set objRS=nothing
if eCounter=0 then
sql="INSERT INTO [USERS] (fname, email_address, password) VALUES
('"&fname&"', '"&email&"', '"&pwd&"')"
myConn.execute(sql)
else
regUser="That email address is already registered"
end if
myConn.close
set myConn=nothing
' response.End
end function
when writing out the generated sql i get this: INSERT INTO [USERS] (fname,
email_address, password) VALUES ('dave', [EMAIL REMOVED] 'nemesis')
which runs perfectly in a query window, just not through the function..
grrrrrr!
any ideas?
tia
========
Advertise with Freelancers.net +Additions+
http://www.freelancers.net/advert.php
Freelancers and Freelance Jobs:
http://www.freelancers.net
Forum FAQs:
http://freelancers.netrickery.com
To unsubscribe please email:
[EMAIL REMOVED]
If you have difficulties unsubscribing please email:
[EMAIL REMOVED]
|
 |
|