[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetds
Subject:    [freetds] FreeTDS no longer returns metadata properly?
From:       Igor Chudov <igor () chudov ! com>
Date:       2008-04-20 16:16:36
Message-ID: 20080420161636.GA31858 () bling ! chudov ! com
[Download RAW message or body]

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 mailing list
FreeTDS@lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic