Ask a Question related to Coldfusion Database Access, Design and Development.
-
CFcippa #1
Problem inserting datas from wddx into Access
:confused;
Hi, I have a problem on my CFMX 6.1 server inserting date type datas from a
wddx.
When I insert a date it is inserted as the date of previsiuos day.
In the wddx there is a field called "DATA_VALORE_NETTO" when I read the wddx,
before
I Insert the records I show the date (at row <TD CLASS="grigio-8"
align="right" width="33%">#Data_Valore_netto#</TD>
without formatting it.
Already here I can see that all the dates are less one day (Es. wddx
24/06/2005 --> read before insert 23/06/2005).
I dont' know if the problem could be in the wddx datas where a read a
suspicious value (see the bold)
<dateTime>2005-5-31T0:0:0+2:0</dateTime>. But the OS timezone i setting to +1.
The insert procedure reads datas from wddx and insert them into a Access DB.
p.s.
We are in CH and the OS time Zone is GMT+1
begin wddx....
<field name='DATA_VALORE_NETTO'>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-6-20T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
<dateTime>2005-6-21T0:0:0+2:0</dateTime>
<dateTime>2005-6-22T0:0:0+2:0</dateTime>
<dateTime>2005-6-21T0:0:0+2:0</dateTime>
<dateTime>2005-6-21T0:0:0+2:0</dateTime>
<dateTime>2005-5-31T0:0:0+2:0</dateTime>
</field>
....wddx end
_________________________________________
Insert procedure
<CFDIRECTORY ACTION="LIST" DIRECTORY="#mydb_wddx_path#" FILTER="t_fondo.wddx"
NAME="list_t_fondo">
<CFIF LIST_t_fondo.RECORDCOUNT EQ 1>
<CFSET WDDX_PRESENT="yes">
<CFELSE>
<CFSET WDDX_PRESENT="no">
</CFIF>
<CFIF WDDX_PRESENT EQ "yes">
<CFFILE ACTION="read" FILE="#mydb_wddx_path#t_fondo.wddx"
VARIABLE="thisWDDX"/>
<CFWDDX ACTION="wddx2cfml" INPUT="#thisWDDX#" OUTPUT="wddx_t_fondo"/>
<H1>Insert wddx<CFOUTPUT>#dateformat(now(),'dd/mm/yyyy')#
#timeformat(now(),'hh:mm:ss')#</CFOUTPUT></H1>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="1" width="100%">
<CFOUTPUT QUERY="wddx_t_fondo">
<TR>
<TD CLASS="grigio-8" width="25%">#NumValore#</TD>
<TD CLASS="grigio-8" width="25%">#tipo#</TD>
<TD CLASS="grigio-8" align="right" width="33%">#Data_Valore_netto#</TD>
<CFIF Tipo NEQ "yield Enhancer" and tipo neq "directional" and tipo neq
"event driven">
<CFTRY>
<CFQUERY DATASOURCE="#db_to#">
update t_fondo
set
ordine=#ordine#,
Nome='#Nome#',
Valuta='#Valuta#',
Valore_netto=#Valore_netto#,
Data_Valore_netto=#createodbcdate(Data_Valore_nett o)#,
Tipo='#Tipo#',
Tipo_E='#Tipo_E#',
Domicilio='#Domicilio#',
Domicilio_E='#Domicilio_E#',
Patrimonio=#Patrimonio#,
Patrimonio_chf=#Patrimonio_chf#,
nParti=#nParti#,
Commento='#Commento#',
Commento_E='#Commento_E#',
Dom_Autoriz='#Dom_Autoriz#',
Dom_fondo='#Dom_fondo#',
Freque_NAV_I='#Freque_NAV_I#',
Freque_NAV_E='#Freque_NAV_E#',
Note_I='#Note_I#',
Note_E='#Note_E#',
All_In_Fee='#All_In_Fee#',
Benchmark='#Benchmark#',
Profilo_I='#Profilo_I#',
Profilo_E='#Profilo_E#',
Profilo_D='#Profilo_D#',
Profilo_F='#Profilo_F#'
where NumValore='#NumValore#'
</CFQUERY>
<TD CLASS="green-8" width="25%">Record inserted</TD>
<CFCATCH>
<TD CLASS="red-8" width="25%">REcord not inserted</TD>
</CFCATCH>
</CFTRY>
<CFELSE>
<TD CLASS="orange-8" width="25%">Fund Type not for internet</TD>
</CFIF>
</TR>
</TR>
</CFOUTPUT>
</TABLE>
<CFELSE>
<H1>Insert wddx mydb site</H1>
<TABLE BORDER="0" CELLPADDING="2" CELLSPACING="1">
<TR>
<TD CLASS="red-9" WIDTH="500">WDDX not found</TD>
</TR>
</TABLE>
</CFIF>
CFcippa Guest
-
INSERTing record into Access
Fellow Flashers, I posted a very similar message to the ColdFusion and Flash integration board last week, but got no responses,so thought I might... -
WDDX DateTime Reconstitution Problem
I've got two different servers extracting time differently from the same wddx package. I run a query that has a dateTime column and wddx the... -
Is it possible to use uniqueidentifier in a web service type Datas
I have made a web service that returns a typed dataset that includes a uniqueidentifier field. When I import this web service into visual studio... -
Inserting form info into access problem
I am developing three different surveys which are the same topic - different view points. I have 2 forms working and going into the tables... -
Coldfusion Query to WDDX problem
I have a cfusion created query that holds all my basket info. I need to pass this basket to a secure server (shard cert) via http. The concept...



Reply With Quote

