[fpc-pascal] Timezone information in a dataset datetime field?
ludo.brands at free.fr
Mon Jul 25 11:51:46 CEST 2011
> Runing an ADO.NET demo program I found out that the ADO.NET
> variant requires timezone info in its date/time fields. In a
> sample export I did, it is set to my timezone (UTC+2 at this moment).
ADO.NET exports timezones but it isn't required for import. Since the main
concern is to export data from fp that can be read by access and ADO.Net,
timezone shouldn't be an issue.
In the same line, trying to match the output of the different access
versions and ADO.NET's isn't, IMHO, the correct approach neither. The goal
for an exporter should be to create XML files that can be imported correctly
and nothing more. I just tested access 2010 and the XML output created by
TCustomXMLXSDExporter was just imported fine, except for the decimal point
that needed to be a dot. MS has learned in the mean time ;) On the other
hand, if you look at the XML output from 2010, it is completely different
from all seen before (see attached file, exported from your test.mdb).
Regarding ADO.NET, different tests and googling show that its XML reader is
simply not compatible with MS ACCESS XSD (all versions).
When reading XML file created by ms access 2010:
- creates 2 datasets, dataroot and tblSample... tblSample has most field
types correct, except for field one (didn't get the autonumber property, nor
the unique requirement. It got the not null).
- indeces aren't used in ADO.NET datasets.
When reading XML file created by ms access 2002:
- breaks on http://www.w3.org/2000/10/XMLSchema, wants
I would conclude that exporting for ADO.NET and access are 2 different
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 30344 bytes
Desc: not available
More information about the fpc-pascal