thanks, I was trying to prevent some of the data from being displayed and I 
did not do a good job did I?

the answer is

VALUES (#preserveSingleQuotes(table1sqlsetup)#)

thanks for the help



At 05:03 PM 8/22/2001 -0500, you wrote:
>If you copied the error directly from the page you might be having an issue
>with the comma.... '''1401 Cedar NorthEast''' has no comma where as VALUES
>(49522,'1401 Cedar, NorthEast' does.   Theoretically it dosent matter
>because it it inside of tics... but try it withouth the comma just to see
>what happens.................
>
>Trishan Singh
>ACP/CCFD
>[EMAIL PROTECTED]
>316-204-1097
>Paracom Technologies
>Suite 501
>245 N Waco
>Wichita KS 67202
>
>----- Original Message -----
>From: "kaigler" <[EMAIL PROTECTED]>
>To: "CF-Server" <[EMAIL PROTECTED]>
>Sent: Wednesday, August 22, 2001 4:47 PM
>Subject: dynamic sql - what am I missing?
>
>
> > I have a query that looks like this:
> >
> > <CFQUERY DATASOURCE="#dbname#" NAME="AddTable1">
> > INSERT INTO #assntablename#
> > (#table1fields#)
> > VALUES (#table1sqlsetup#)
> > </CFQUERY>
> >
> > when I run the code without the update I get something that looks right:
> > INSERT INTO mhha
> > (ID,wAddress1, wCity, wState, wZip, WorkPhone, WorkFax, Email,
>CompanyName)
> > VALUES (49522,'1401 Cedar, NorthEast','Grand
> > Rapids','MI','49503','616/004-0002','616/004-0997','[EMAIL PROTECTED]','Visiting
> > Nurse Services')
> >
> > when I run this code I get the following error:
> >
> > ODBC Error Code = 37000 (Syntax error or access violation)
> > [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator)
> > in query expression '''1401 Cedar NorthEast'''.
> > The error occurred while processing an element with a general identifier
>of
> > (CFQUERY), occupying document position (220:5) to (220:52) in the template
> > file C:\INETPUB\WWWROOT\AFFINISCAPE\HTDOCS\ADMINUPLOADBATCH.CFM.
> > Date/Time: 08/22/01 16:37:43
> > Browser: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
> > Remote Address: 127.0.0.1
> >
> > Line 220 is the start  of the cfquery.
> >
> >
> > If I take the sql that is generated and wrap cfquery tags around it like
>this:
> >
> > <CFQUERY DATASOURCE="#dbname#" NAME="AddTable1">
> > INSERT INTO mhha
> > (ID,wAddress1, wCity, wState, wZip, WorkPhone, WorkFax, Email,
>CompanyName)
> > VALUES (49522,'1401 Cedar, NorthEast','Grand
> > Rapids','MI','49503','616/004-0002',
> > '616/004-0997','[EMAIL PROTECTED]',
> > 'Visiting Nurse Services')
> > </cfquery>
> >
> > it works fine and adds the record.
> >
> >
> >
> >
> >
> > Can you do what I am trying to do?  Do you have to make the entire query
> > dynamic?  What am I missing?
> >
> > thanks,
> > kaigler
> >
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to