> > > BTW: It seems, that the statement handle attributes need the
> > > same mapping.
> >
> > So the Provider does not supply any information on how to support
> > data types adVarWChar and adLongVarWChar.
>
> Perhaps ADO char types already support unicode.
I does appear that the Jet driver supports unicode, however it would
be very helpful if the Provider informed us ... <sigh> In other
words, type_info_all has no knowledge of the unicode support because
the provider does not list the data types in a call to
OpenSchema(adSchemaProviderType).
Here is a beginning conversion table:
I need to create a patch for DBI to support SQL_UNKNOWN_TYPE, but
for now it's a constant.
use constant SQL_UNKNOWN_TYPE => 0;
$myado_types_supported = {
$ado_consts->{adArray} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adBigInt} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adBinary} => DBI::SQL_BINARY
, $ado_consts->{adBoolean} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adBSTR} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adChapter} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adChar} => DBI::SQL_CHAR
, $ado_consts->{adCurrency} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adDate} => DBI::SQL_DATE
, $ado_consts->{adDBDate} => DBI::SQL_DATE
, $ado_consts->{adDBTime} => DBI::SQL_TIMESTAMP
, $ado_consts->{adDBTimeStamp} => DBI::SQL_TIMESTAMP
, $ado_consts->{adDecimal} => DBI::SQL_DECIMAL
, $ado_consts->{adDouble} => DBI::SQL_DOUBLE
, $ado_consts->{adEmpty} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adError} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adFileTime} => DBI::SQL_TIMESTAMP
, $ado_consts->{adGUID} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adIDispatch} => SQL_UNKNOWN_TYPE
, $ado_consts->{adInteger} => DBI::SQL_INTEGER
, $ado_consts->{adIUnknown} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adLongVarBinary} => DBI::SQL_LONGVARBINARY
, $ado_consts->{adLongVarChar} => DBI::SQL_LONGVARCHAR
, $ado_consts->{adLongVarWChar} => DBI::SQL_WLONGVARCHAR
, $ado_consts->{adNumeric} => DBI::SQL_NUMERIC
, $ado_consts->{adPropVariant} => SQL_UNKNOWN_TYPE
, $ado_consts->{adSingle} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adSmallInt} => DBI::SQL_SMALLINT
, $ado_consts->{adTinyInt} => DBI::SQL_TINYINT
, $ado_consts->{adUnsignedBigInt} => SQL_UNKNOWN_TYPE
, $ado_consts->{adUnsignedInt} => SQL_UNKNOWN_TYPE
, $ado_consts->{adUnsignedSmallInt} => SQL_UNKNOWN_TYPE
, $ado_consts->{adUnsignedTinyInt} => SQL_UNKNOWN_TYPE
, $ado_consts->{adUserDefined} => SQL_UNKNOWN_TYPE
, $ado_consts->{adVarBinary} => DBI::SQL_VARBINARY
, $ado_consts->{adVarChar} => DBI::SQL_VARCHAR
, $ado_consts->{adVariant} =>
SQL_UNKNOWN_TYPE
, $ado_consts->{adVarNumeric} => DBI::SQL_INTEGER
, $ado_consts->{adVarWChar} => DBI::SQL_WVARCHAR
, $ado_consts->{adWChar} => DBI::SQL_WCHAR
};
Changes welcomed!
Tom
--
Thomas A. Lowery
See DBI/FAQ http://tlowery.hypermart.net
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com