Issue when writing Timestamp with milli seconds to DB2
Posted: Tue Jun 09, 2009 8:40 am
Hi ,
I tried 2 different methods.
1)ODBC Enterprise: Get the Timestamp with Microseconds use the left 23 characters and then concatenate "000" to end so,
it will have 6 second digits.Passing data to ODBC Enterprise as a varchar worked but the issue with ODBC enterprise is
I couldn't pass rejects sqlcode to a reject file.
Did anybody succeeded passing the SQLCODE down to somewhere from the Rejects link? wanted to see if we need a patch?
2)To have the reject code I went back to use ODBC Connector where I can't really pass the varchar to Timestamp.
I did try using the "StringToDate" and "StringToTime" function but couldn't get them to work with milli seconds.
For Ex: String I have "2009-06-09 12:12:12.123000" then no matter what I do I will end up with "2009-06-09 12:12:12.000000"
(Note: I do have Extended(Microseconds) property set up with for each Timestamp field).
Any idea on what needs to be done?
Thanks
nsm
I tried 2 different methods.
1)ODBC Enterprise: Get the Timestamp with Microseconds use the left 23 characters and then concatenate "000" to end so,
it will have 6 second digits.Passing data to ODBC Enterprise as a varchar worked but the issue with ODBC enterprise is
I couldn't pass rejects sqlcode to a reject file.
Did anybody succeeded passing the SQLCODE down to somewhere from the Rejects link? wanted to see if we need a patch?
2)To have the reject code I went back to use ODBC Connector where I can't really pass the varchar to Timestamp.
I did try using the "StringToDate" and "StringToTime" function but couldn't get them to work with milli seconds.
For Ex: String I have "2009-06-09 12:12:12.123000" then no matter what I do I will end up with "2009-06-09 12:12:12.000000"
(Note: I do have Extended(Microseconds) property set up with for each Timestamp field).
Any idea on what needs to be done?
Thanks
nsm