#!/usr/bin/perl -w
#
use strict;
use DBI;
use DBD::ODBC;
my ($dataSource, $dataBase, $userID, $userPWD) = ("chidsql05-sql", "MarketPriceCapture", "QSGLINUX", "Spot123");
my $conString = "DRIVER=FREETDS;Server=$dataSource;Database=$dataBase;UID=$userID;PWD=$userPWD";
my $dbh = DBI->connect("DBI:ODBC:$conString")
or die "NOOOOO";
my $sql = "select top 1 * from QuadexCalibration5Min";
my $sth = $dbh->prepare($sql);
$sth->execute();
while (my $result = $sth->fetchrow_hashref) {
print $result->{AsOfDate};
}
$dbh->disconnect;
阅读(827) | 评论(0) | 转发(0) |