Skip to Content.
Sympa Menu

freetds - RE: [freetds] Different Data?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Зверев Виталий Борисович <VZverev AT genesis.spb.ru>
  • To: 'FreeTDS Development Group' <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Different Data?
  • Date: Wed, 15 Oct 2003 00:16:14 +0400

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.
**************************************************************





Archive powered by MHonArc 2.6.24.

Top of Page