AsVariant does not appear to be doing any data type conversions to
the native data type. To keep our application International
friendly, we are tranmitting all dates, times and datetimes as
Floating Point Integers. I made the assumption that AsVariant would
convert these to the correct values when I inserted them into the
Palm tables, but it is merely trying to insert the string of the
Float into the Date field which of course is bombing.
Any suggestions to make this easy without testing the datatype
property and converting the Float to a datetime then inserting?
Thanks
josh
BTW, I also posted this on the Yahoo Group.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey. Sorry I didn't reply to this sooner; it's been a busy week. As you've found, the AsVariant isn't exactly universal; internally, a record is represented as text, with the field definitions telling it how to interpret that text as data to store in the table. AsVariant was originally mainly introduced to allow users to get and set a variant block of binary data.
I can't offer any suggestion other than manually checking your variant to see if it's a date/time and using the AsDateTime property of the fields.
Sorry.
DreamMater.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
AsVariant does not appear to be doing any data type conversions to
the native data type. To keep our application International
friendly, we are tranmitting all dates, times and datetimes as
Floating Point Integers. I made the assumption that AsVariant would
convert these to the correct values when I inserted them into the
Palm tables, but it is merely trying to insert the string of the
Float into the Date field which of course is bombing.
Any suggestions to make this easy without testing the datatype
property and converting the Float to a datetime then inserting?
Thanks
josh
BTW, I also posted this on the Yahoo Group.
Hey. Sorry I didn't reply to this sooner; it's been a busy week. As you've found, the AsVariant isn't exactly universal; internally, a record is represented as text, with the field definitions telling it how to interpret that text as data to store in the table. AsVariant was originally mainly introduced to allow users to get and set a variant block of binary data.
I can't offer any suggestion other than manually checking your variant to see if it's a date/time and using the AsDateTime property of the fields.
Sorry.
DreamMater.