Michael Peppler wrote:
>>Currently if I make a user-defined type on Sybase and use it for some
>>column C of a table T, then for 'SELECT C FROM T' DBD::Sybase gives me
>>the name of the user type.
>I just tried it, using a user-defined type mapped to varchar(30), and
>type_info() returns "char" (which is correct).
Hmm, I spoke too soon. In fact Sybase isn't giving me a user-defined
type of the column, but some other crap.
my $dbh
= DBI->connect('dbi:Sybase:server=MY_SERVER;database=mydb',
'myuser', 'mypass',
{ RaiseError => 1, AutoCommit => 0 });
$dbh->do('create table #foo (c int)');
my $sth = $dbh->prepare('select c from #foo');
execute $sth;
my $data = $sth->fetchall_arrayref;
print $dbh->type_info($sth->{TYPE}->[0])->{TYPE_NAME}, "\n";
This prints 'event_type_t', although the column was clearly defined as
int. However with a different database on the same server (eg master),
it prints correctly 'int'. So there is some weirdness in my database.
--
Ed Avis <[EMAIL PROTECTED]>