[freetds] Different Data?

Зверев Виталий Борис Зверев Виталий Борис
Wed Oct 15 01:16:14 EDT 2003


Hi Jeff.
Do you try select from table or view? If it was view then you could check
connection options:
select @@SERVERNAME , @@options

Sincerely yours.

------------------------------------------------------------
Vitaly Zverev, Oracle Applications DBA,
Genesis Ltd., S.Petersburg, Russia


-----Original Message-----
From: Vendetti, Jeff [mailto:Jeff.Vendetti at FMR.COM] 
Sent: Tuesday, October 14, 2003 7:48 PM
To: 'freetds at lists.ibiblio.org'
Subject: [freetds] Different Data?


Sure, here's the perl program:

#!/usr/local/bin/perl
use strict;
use DBI;
my ($dbh, $rc, $sth, @tablesViews);
$dbh = DBI->connect("dbi:Sybase:server=CSL_Central",'fish','fish',
        {PrintError => 0});
die "Unable to connect to server $DBI::errstr" unless $dbh;
@tablesViews = qw(
        CSLCorePageVolume
        CSLPageVolume
        CSLPracticeUserVolume
        CSLRealmUserVolume
);
foreach (@tablesViews)
{
        print "Count for $_: ";
        my @dat;
        $sth = $dbh->prepare("select count(*) from $_");
        if ($sth->execute())
        {
                while (@dat = $sth->fetchrow())
                {
                        print "@dat\n";
                }
        }
        else
        {
                print "No Rows\n";
        }
        $sth->finish();
}
$dbh->disconnect();

And here's the tsql session:

1>
2> select count(*) from CSLCorePageVolume
3> go
2486

The MSQuery returns 5385 rows.

Jeff

**************************************************************
Scanned by  MailScan Anti-Virus and Content Security Software.
Visit http://www.mwti.net for more info on eScan and MailScan.
**************************************************************



More information about the FreeTDS mailing list