Hi Perl Monks!
My colleague created 1 table named <pc-name>\EXPRESS:Yield. I want to use DBI to connect it but somehow it couldn't >_<
i have created new connection in ODBC.ini as below:
My code to connect to the SQLEXPRESS:[PC-NAME] Description=ODBC Data Sources Driver=FreeTDS Port=1433 Server=PC-NAME\SQLEXPRESS TDS_Version=7.1 Trace=No
$dbh=DBI->connect("dbi:MTODBC:PC-NAME:Yield","<usr>","<pw>") || die "$ +DBI::errstr\n";
Error message as below:
checkErrorODBC3 E SQLException: SQLState=[08001] Code=[0] Msg=[[mtodbc +]: Connecting: [unixODBC][FreeTDS][SQL Server]Unable to connect to da +ta source] DBI connect('PC-name:Yield','usr',...) failed: (mtodbc): Connecting: [ +unixODBC][FreeTDS][SQL Server]Unable to connect to data source (SQLST +ATE:08001) (CODE:0) (SEVERITY:SQLException) DBD: [dbd_db_login6/checkOutConnectionW(login)] RetCode=[-1] at ../dat +a_extraction_sqlite.pl line 615 (mtodbc): Connecting: [unixODBC][FreeTDS][SQL Server]Unable to connect + to data source (SQLSTATE:08001) (CODE:0) (SEVERITY:SQLException) DBD: [dbd_db_login6/checkOutConnectionW(login)] RetCode=[-1]
Can any1 help me to improve my knowledge on this? im able to connect his database in SSMS but why my unix cant~~ >_<
Appreciate ur feedback!
In reply to Use DBI for pc-name\SQLEXPRESS by wcyoong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |