Thomas A. Lowery wrote: > > Steffen, > > So that we're talking apples to apples, I've attached a zip file > that includes an experimental version of DBD::ADO (2.4_01), an > Access 2000 mdb (mytest.mdb) with a table called demo that > includes all the different data types, a perl test script > (mytest.pl), various short cut commands, and the results of > mytest.pl (out.txt). > > Are you seeing the same results?
Yes, except for
Microsoft.Jet.OLEDB.4.0 2.5
Indeed, I compared apples and oranges! The strange types in your
example are from the 'Type' property of a 'Field' (of a
'Recordset'), but most of my tests use OpenSchema(), e.g.:
perl OpenSchema.pl adSchemaColumns "" "" demo
where I never encountered these strange type values.
I'm sure enough: it's a buggy implementation of the provider.
Nevertheless, we have to cope with this.
Interestingly, ADO defines for 3 sources of type information:
- Type Property in the Field Object
- DATA_TYPE in the COLUMNS Rowset (adSchemaColumns)
- DATA_TYPE in the PROVIDER_TYPES Rowset (adSchemaProviderTypes)
3 different domains:
- DataTypeEnum
- DBTYPEENUM
- (undefined)
> Also, do you have a pre Jet 4.0
> (Access 2000) mdb that you would send me?
>
Attached. You can create older formats with
ODBC Data Source Administrator
-> (choose a MS Access Data Source)
-> Configure ...
-> Create ...
-> (choose a format: 4.x, 3.x, 2.x)
> Tom
>
Let me add some remarks for convert_ado_to_odbc():
- adArray is a special case: it's not a type of it's own, but
'always combined with another data type constant'
(according to the ADO docs, I have no test case)
- SQL/CLI and ODBC need 2 additional type codes for temporal types:
- SQL_DATA_TYPE (!= DATA_TYPE)
- SQL_DATETIME_SUB
=> a case for wantarray?
Steffen
2x.mdb.tar.gz
Description: GNU Zip compressed data
