you have single quotes round your #trim(attributes.userid)# in the insert
statement, and unless you have stored this as a text variable instead of a
numeric variable in the database for some reason they shouldn't be there.

--
James Smith - [EMAIL PROTECTED]
http://ask-ted.com - Thiele Euronet Directories Limited
=====================================================================
       C.O.B.O.L - Completely Obsolete Boring Old Language.


----- Original Message -----
From: Shawn Regan <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 03, 2000 9:56 PM
Subject: OT: SQL! i'm losing it


> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
>
> ------_=_NextPart_001_01BFB542.15933410
> Content-Type: text/plain;
> charset="iso-8859-1"
>
> I have checked and checked this but I cannot see anything wrong with this
> code:
>
> <cfquery name="adduser" datasource="#DSN#">
> insert into users
> (user_id,Group,firstname,lastname,Title,email,Password,UserID,ClientID)
> values
>
(#max_ID#,'#trim(attributes.Group)#','#trim(attributes.firstname)#','#trim(a
>
ttributes.lastname)#','#trim(attributes.Title)#','#trim(attributes.email)#',
>
'#trim(attributes.Password)#','#trim(attributes.userid)#',#trim(attributes.C
> lientID)#)
> </cfquery>
>
> But I keep getting this error:
>
> ODBC Error Code = 37000 (Syntax error or access violation)
>
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
> statement.
>
>
> SQL = "insert into users
> (user_id,Group,firstname,lastname,Title,email,Password,UserID,ClientID)
> values
>
(2,'External','Shawn','Regan','Webmaster','[EMAIL PROTECTED]','kick','597',2)"
>
> Anyone see what I am missing?
>
> Shawn Regan
>
> ------_=_NextPart_001_01BFB542.15933410
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
> charset=3Diso-8859-1">
> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
> 5.5.2650.12">
> <TITLE>OT: SQL! i'm losing it</TITLE>
> </HEAD>
> <BODY>
>
> <P><FONT SIZE=3D2>I have checked and checked this but I cannot see =
> anything wrong with this code:</FONT>
> </P>
>
> <P><FONT SIZE=3D2>&lt;cfquery name=3D&quot;adduser&quot; =
> datasource=3D&quot;#DSN#&quot;&gt;</FONT>
> <BR><FONT SIZE=3D2>insert into users =
> (user_id,Group,firstname,lastname,Title,email,Password,UserID,ClientID) =
> values =
> (#max_ID#,'#trim(attributes.Group)#','#trim(attributes.firstname)#','#tr=
> im(attributes.lastname)#','#trim(attributes.Title)#','#trim(attributes.e=
> mail)#','#trim(attributes.Password)#','#trim(attributes.userid)#',#trim(=
> attributes.ClientID)#)</FONT></P>
>
> <P><FONT SIZE=3D2>&lt;/cfquery&gt;</FONT>
> </P>
>
> <P><FONT SIZE=3D2>But I keep getting this error:</FONT>
> </P>
>
> <P><FONT SIZE=3D2>ODBC Error Code =3D 37000 (Syntax error or access =
> violation)</FONT>
> </P>
> <BR>
>
> <P><FONT SIZE=3D2>[Microsoft][ODBC Microsoft Access Driver] Syntax =
> error in INSERT INTO statement.</FONT>
> </P>
> <BR>
>
> <P><FONT SIZE=3D2>SQL =3D &quot;insert into users =
> (user_id,Group,firstname,lastname,Title,email,Password,UserID,ClientID) =
> values =
> (2,'External','Shawn','Regan','Webmaster','[EMAIL PROTECTED]','kick','597'=
> ,2)&quot;</FONT></P>
>
> <P><FONT SIZE=3D2>Anyone see what I am missing?</FONT>
> </P>
>
> <P><FONT SIZE=3D2>Shawn Regan</FONT>
> </P>
>
> </BODY>
> </HTML>
> ------_=_NextPart_001_01BFB542.15933410--
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to