Page 1 of 1

Invalid casting

Posted: Wed Jun 14, 2006 3:37 am
by bmnaidu
My server job details :

Source data file : Text File
Target Database : MS Access

The problem is when am trying to read part of text from source file (which is of the format YYYYMMDD) and append that value to a date field to the target am getting "Invalid character value for cast specification (null)".

The way am calculating is -->
Oconv(Iconv(RawOut.DOB1,"DYMD"),"D/DMY[2,2,4]").

If I change the data type of the corresponding column in the target DB to VARCHAR then it is working fine. The problem comes only if the target field is of type DATE or TIMESTAMP.

Please help me to solve this.

Posted: Wed Jun 14, 2006 5:42 am
by sb_akarmarkar
I dont have experince with MS Access but i think .. You need to convert varchar date you are getting into Date/time datatype of MS Access....
I think convert function my help you...


Thanks,
Anupam

Posted: Wed Jun 14, 2006 1:49 pm
by DSguru2B
Check the format for Date and Timestamp in Access.