Brant Winter wrote:

> What am i doing wrong here ? Sorry about the huge post, but I just
> cant see
> what I am missing now ? The error in line 57 refers to a different field
> than the exception message showing an address "Syntax error (missing
> operator) in query _expression_ '2 HOLBOURN CRES'."   ????
>
> <cfhttp url="" name="qData" delimiter=","
>
> resolveurl="no" timeout="20"></cfhttp>
> <!--- <cfdump var="#qData#"> --->
> <cfloop query="qData">
>   <cfquery datasource="obscript">
>   INSERT INTO scripts ( SRXNO, SDISPDATE, PTITLE, PFIRSTNAME,
> PSURNAME, PADDRESS, PSUBURB, PPOSTCODE, PMEDICARE, PMEDICDATE,
> PCONCTYPE, PCONCNO, PCONCVDATE, PSAFENTNO, PREPATNO, SDOCPRESNO,
> SDOCNAME, SDRUGDESC, SALTDESC, SQTY, SAUTHORITY, SSIGS, SWARDNO )
>   VALUES ( #qData.SRXNO#, #qData.SDISPDATE#, #qData.PTITLE#,
> #qData.PFIRSTNAME#, #qData.PSURNAME#, #qData.PADDRESS#,
> #qData.PSUBURB#, #qData.PPOSTCODE#, #qData.PMEDICARE#,
> #qData.PMEDICDATE#, #qData.PCONCTYPE#, #qData.PCONCNO#,
> #qData.PCONCVDATE#, #qData.PSAFENTNO#, #qData.PREPATNO#,
> #qData.SDOCPRESNO#, #qData.SDOCNAME#, #qData.SDRUGDESC#,
> #qData.SALTDESC#, #qData.SQTY#, #qData.SAUTHORITY#, #qData.SSIGS#,
> #qData.SWARDNO# )
>   </cfquery>
> </cfloop>

You need single quotes around your text and dates must in an appropriate
format for your database.

You should look into using CFQueryParam and possibly CreateODBCDateTime
et al.

Stephen
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to