wcyoong has asked for the wisdom of the Perl Monks concerning the following question:
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Use DBI for pc-name\SQLEXPRESS
by FloydATC (Deacon) on Aug 06, 2018 at 10:40 UTC | |
by wcyoong (Initiate) on Aug 07, 2018 at 07:37 UTC | |
by FloydATC (Deacon) on Aug 07, 2018 at 08:32 UTC | |
|
Re: Use DBI for pc-name\SQLEXPRESS
by anonymized user 468275 (Curate) on Aug 06, 2018 at 09:35 UTC | |
by FloydATC (Deacon) on Aug 06, 2018 at 11:20 UTC | |
|
Re: Use DBI for pc-name\SQLEXPRESS
by wcyoong (Initiate) on Oct 04, 2018 at 08:37 UTC |