[PerlChina] SQL server一问
Uliyas Fan
uliyas at gmail.com
Wed Sep 27 04:10:05 PDT 2006
想用perl去访问SQL server,在数据源里建立了系统DSN
"RCA"(远程服务器),并且在数据源里测试连接成功。但是用perl来尝试得到一个connection的时候,总是返回undef,谁能指点一下是为什么啊?
use Win32::ODBC;
{
my $DSN = "RCA";
my $dbcon1 = new Win32::ODBC($DSN); #这里总是得不到handler
if($dbcon1){
print "connection is ok";
}
$dbcon1 -> close();
}
顺便想问问,一般在windows上调用SQL server都是用什么方法啊?
--
Uliyas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/china-pm/attachments/20060927/3edd881e/attachment.html
More information about the China-pm
mailing list