It has been my experience as well as the experience of other developers
on this list that cfupdate is flaky at best unless your table only has a
couple of fields. I have since stopped using cfupdate even with very
small tables. Try putting it in a cfquery tag instead and see what
happens.

-----Original Message-----
From: Robert Polickoski [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 24, 2002 1:27 AM
To: CF-Talk
Subject: <cfupdate> conundrum

All,

I am running CFMX on WindowsXP Pro with MySQL database.

The structure of Document Table:

Field,Type,Null,Key,Default,Extra,
DocumentIndex,int(11),,PRI,,auto_increment,
DocumentID,smallint(6),YES,,,,
DocumentName,text,YES,,,,
DocumentFileName,text,YES,,,,
Author,smallint(4),YES,,,,
DocumentType,smallint(4),YES,,,,



The results of <cfdump var="#Form#">

AUTHOR 27 
DOCUMENTENTRYFORMSUBMITBUTTON Submit Entry 
DOCUMENTFILENAME EmployeeEntryForm.cfm 
DOCUMENTID 1 
DOCUMENTINDEX 12 
DOCUMENTNAME Employee Entry Form 
DOCUMENTTYPE 1 
FIELDNAMES
DOCUMENTINDEX,DOCUMENTID,DOCUMENTNAME,DOCUMENTFILENAME,AUTHOR,DOCUMENTTY
PE,NEWDOCUMENTTYPEBUTTON,DOCUMENTENTRYFORMSUBMITBUTTON 
NEWDOCUMENTTYPEBUTTON New Document Type 

Error from <cfupdate datasource="#dbSource#" username="#dbUserName#"
password="#dbPassword#" tablename="Document" formfields="DocumentIndex,
DocumentID, DocumentName, DocumentFileName, Author, DocumentType">


Error Occurred While Processing Request  
Error Executing Database Query.  
Cannot convert class java.lang.Integer to SQL type requested  
  
The Error Occurred in C:\Program
Files\Macromedia\CFusionMX\wwwroot\ISRD\application\DocumentDataEntry.cf
m: line 38
 
36 : <cfelseif IsDefined("Form.DocumentIndex")>
37 :    <cfdump var="#Form#">
38 :    <cfupdate datasource="#dbSource#" username="#dbUserName#"
password="#dbPassword#" tablename="Document" formfields="DocumentIndex,
DocumentID, DocumentName, DocumentFileName, Author, DocumentType">
39 : <cfelse>
40 :    <cfset Form.DocumentIndex =
CheckExistingDocumentEntry.DocumentIndex>
 



______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to