Insertion de BLOB,CLOB,xml avec oracle 10g
Bonjour,
J'ai une table test qui est constitué des champs suivants:
n_id (number) ,c_char(char), c_vchar(varchar2), d_date(date),
c_lob(clob), b_lob(blob),x_xml(xml)
le formulaire:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
<cfinclude template="../dsp_header.cfm">
<BODY>
<cfform method="POST" action="../index.cfm?fuseaction=insert_data" >
<!--- <cfinput type="hidden" name="validate" value="true"> --->
<cfinput type="text" name="nombre" value="21"> - Un nombre<BR>
<cfinput type="text" name="unchar" value="abc"> - Un char<BR>
<cfinput type="text" name="unstring" value="un string"> - Un string<BR>
<cfinput type="text" name="unedate" value=""> - Une date<BR>
<cfinput type="file" name="clob" value=""> -Un clob<BR>
<cfinput type="file" name="blob" value=""> - Un blob<BR>
<cfinput type="file" name="xml" value=""> - Un fichier Xml<BR>
<cfinput type="submit" name="Submit" value="Submit">
</cfform>
</BODY>
<cfinclude template="../dsp_footer.cfm"> |
la page index.cfm
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<cfinclude template="app_globals.cfm">
<cfparam name="attributes.fuseaction" default="hello">
<cfswitch expression="#attributes.fuseaction#">
<cfcase value="goodbye">
<cfinclude template="monCircuit/dsp_goodbye.cfm">
</cfcase>
<cfcase value="hello">
<cfinclude template="monCircuit/dsp_hello.cfm">
</cfcase>
<cfdefaultcase>
<cfinclude template="monCircuit/dsp_hello.cfm">
</cfdefaultcase>
<cfcase value="dsp_data">
<!--- <cfinclude template="monCircuit/qry_readDb.cfm"> --->
<cfinclude template="monCircuit/dsp_viewData.cfm"/>
</cfcase>
<cfcase value="insert_data">
<cfinclude template="monCircuit/qry_writteDb.cfm"/>
<cfinclude template="monCircuit/dsp_viewData.cfm">
</cfcase>
</cfswitch> |
Code:
1 2 3
|
<cfquery name="inputData" datasource="SG_CDVISA">
insert into OJTEST(n_id,c_char,c_vchar,d_date,c_lob ,b_lob ) values(#attributes.nombre#,'#attributes.unchar#','#attributes.unstring#','#attributes.unedate#','#attributes.clob#',"#attributes.blob#","#attributes.xml#" ) |
J'ai essayé de les inserer un par un et ça marche jusqu'au clob. Je n'arrive pas à inserer des blob ni xml.
Une idée ?:roll:
mon environement:
Windows xp sp2
eclipse 3.2 avec cfeclipse
coldfusion MX7
Oracle 10g