Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: michael dot peppler at bnpparibas dot com
Subject: Re: DBD::Sybase and SQL_DATA_TYPE
Date: Mar 15 2005 12:23PM

DBD::Sybase relies on Sybase's sp_datatype_info proc to get the data for

A quick check on shows that sp_datatype_info returns NULL values
for SQL_DATA_TYPE, hence the behavior that you see.

In order to fix it you'd have to fill in the SQL_DATA_TYPE column somehow,
possibly from the TYPE_NAME column - although that means that you get the
Sybase typenames, and not generic SQL types (assuming a good match exists).

The required changes need to be applied in the type_info_all subroutine in - you are welcome to submit a patch :-)


Internet - 15/03/2005 11:43

Sent by:

To:    sybperl-l


Subject:    DBD::Sybase and SQL_DATA_TYPE

I note that with DBD::Sybase when using $sth->{TYPE} and type_info() to
look up the datatypes of columns in a query result, the SQL_DATA_TYPE
is always undef.  I think it usually contains a bit of SQL like
'varchar(10)'.  How difficult would it be to add this?

Ed Avis 

This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 


Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.