Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am playing with dbi:ODBC and the Port parameter. How is it possible that if I change Port to any number, the connection never fails?
my $ODBCdriver = 'SQL Server'; my $SQLserver = 'FC4FA9\SQLEXPRESS'; my $SQLdatabase = 'test'; my $SQLuser = 'username'; my $SQLpassword = 'password'; my $SQLport = '12345'; $dbh = DBI->connect("dbi:ODBC:Driver={$ODBCdriver};Server=$SQLserver;D +atabase=$SQLdatabase;UID=$SQLuser;PWD=$SQLpassword;Port=$SQLport", {P +rintError => 0, RaiseError => 1, AutoCommit => $AutoCommit, FetchHash +KeyName => 'NAME_lc'}) or die "Can't connect to the database: $DBI::e +rrstr\n";
The database is listening on 1433 (Windows)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: dbi:ODBC change Port
by Corion (Patriarch) on Nov 10, 2022 at 07:52 UTC | |
by Anonymous Monk on Nov 10, 2022 at 09:02 UTC | |
by Corion (Patriarch) on Nov 10, 2022 at 09:48 UTC | |
by Anonymous Monk on Nov 10, 2022 at 10:12 UTC | |
by Corion (Patriarch) on Nov 10, 2022 at 10:27 UTC | |
by bliako (Abbot) on Nov 10, 2022 at 11:49 UTC | |
by bliako (Abbot) on Nov 10, 2022 at 09:10 UTC | |
|
Re: dbi:ODBC change Port
by Anonymous Monk on Nov 10, 2022 at 12:20 UTC | |
by Corion (Patriarch) on Nov 10, 2022 at 12:50 UTC |