That's another great point--take some sample data and run the query directly in the database. Sometimes the error you get back from the database driver isn't as helpful as the one you get in the database itself.

Matt

On May 17, 2005, at 8:48 PM, Ken Ferguson wrote:

Gary,

My first thought was, like Matt suggested:

<cfoutput>
INSERT INTO IVES.VIDEO (IVESID, VIDEOID,INVENTORYKEYCODE)<br>
VALUES (#IvesId#, #VideoNumber#, '#InventoryKeyCode#')

</cfoutput>

just to see what it actually looks like. If it looks ok on the screen, then try the query in sql plus or toad or whatever you're using. You may want to use cfqueryparam with those values too when you're doing your inserts and updates in CF.

--Ferg


----- Original Message ----- From: "Matthew Woodward" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 17, 2005 8:02 PM
Subject: Re: I'm about to pull out what little hair I have...




Guessing here, but the first thing I'd check is the datatypes of the data that you're inserting into the database and other data- related issues. First off, make sure that IvesID and VideoNumber are both integers; if not, they'll need single-quotes around them. (I'm assuming this is the case and they're fine as is, but you never know ...)
Second, what's up with the InventoryKeyCode? Does that piece of data itself have any single quotes in it or other characters that might throw the database?


It would be really helpful if you created your query statement as a string and just output it to the screen--then you could see what CF sees when it's attempting to do the insert.

Matt

On May 17, 2005, at 7:55 PM, Gary L. Alford wrote:


Windows 2000 Server
IE Version 6.0.2800.1106
Oracle 9i Database
CFMX Server 6.1
Development running on IIS (no public / hosted server as yet)

I have a query:

 <cfquery name="AddCase" datasource="#DBDSN#" username="#AppID#"
password="#AppPW#">
    INSERT INTO IVES.VIDEO (
        IVESID,
        VIDEOID,
        INVENTORYKEYCODE)
    VALUES (
        #IvesId#,
        #VideoNumber#,
    '#InventoryKeyCode#')
 </cfquery>

that returns the following error:

Error Occurred While Processing Request



The string is not closed.

String begins on line 398, column 44.


The CFML compiler was processing:


* The body of a cfquery tag beginning on line 269, column 2.


The error occurred in C:\Inetpub\wwwroot\IVES\admin \AddCaseAction.cfm: line
398



396 : #IvesId#,

397 :             #VideoNumber#,

398 :             '#InventoryKeyCode#')

399 :     </cfquery>

400 : </cfloop>

Similar problems have arose when trying to insert a literal value in other
queries (i.e. INSERT INTO DATATABLE (FIELD1) VALUES ('V').


Can someone please shed some light? (Please note: I am not a CF
Administrator guru. If it involves settings in my CF Administrator, please
walk me through it carefully.)


TIA

  _____

Gary L. Alford
Adjunct Professor, Dallas Baptist University
(817) 261-6238
[EMAIL PROTECTED]
  _____





<winmail.dat>



-- Matthew Woodward [EMAIL PROTECTED]


---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm



---------------------------------------------------------- To post, send email to [email protected] To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm




-- Matthew Woodward [EMAIL PROTECTED]


----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe: http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: http://www.dfwcfug.org/form_MemberRegistration.cfm





Reply via email to