Skip to Content.
Sympa Menu

freetds - [freetds] FreeTDS no longer returns metadata properly?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Igor Chudov <igor AT chudov.com>
  • To: FreeTDS AT lists.ibiblio.org
  • Subject: [freetds] FreeTDS no longer returns metadata properly?
  • Date: Sun, 20 Apr 2008 11:16:36 -0500

Big thanks to authors and maintainers of freetds.

I have a perl scipt using DBI and FreeTDS. It connects to a Microsoft
server, and makes a "select *" query. Then it analyzes results
metadata and tries to figure out types of columns.

$sth = $remote_dbh->prepare( "select * from $table" )
|| report_error_and_die "Cannot query Mike's database (prepare)";
$sth->execute() || report_error_and_die "Cannot query Mike's database
(execute)";

my $col_names = $sth->{NAME};
my $col_types = $sth->{TYPE};

Col_names array ref is great and contains the list of column names.

col_types array ref, which used to work and contained valid type
numbers, no longer works on 64 bit ubuntu Hardy. Instead of valid
types, it contains a bunch of zeroes (as many as columns).

Can anyone help me get the right type numbers?

i



  • [freetds] FreeTDS no longer returns metadata properly?, Igor Chudov, 04/20/2008

Archive powered by MHonArc 2.6.24.

Top of Page