Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: dbi:ODBC change Port

by Anonymous Monk
on Nov 10, 2022 at 10:12 UTC ( [id://11148091]=note: print w/replies, xml ) Need Help??


in reply to Re^3: dbi:ODBC change Port
in thread dbi:ODBC change Port

This is a good suggestion and makes the call more readable. I implemented it. However, it does not solve the issue. Calling:

my $dsn = "dbi:ODBC:Driver={$ODBCdriver};Server=$SQLserver,$SQLport;Da +tabase=$SQLdatabase;UID=$SQLuser;PWD=$SQLpassword; ...";

Note that I moved ',$SQLport' to Server. This syntax never connects. This is probably because it is not the syntax expected by Perl DBI (all examples on Perlmonks too also use '; Port=1433' which instead always connects no matter the port I use -> this indicates - I guess - that the parameter is not used. To be honest, I have no ideas.

Replies are listed 'Best First'.
Re^5: dbi:ODBC change Port
by Corion (Patriarch) on Nov 10, 2022 at 10:27 UTC

    The Perl DBI does not care about the contents of (the parameters part of) the DSN. This is between you and the ODBC driver, which is why I linked to https://connectionstrings.com.

    As none of the two approaches seem to work, I suggest you look closer at the ODBC driver and the version you have, and then find out what the proper connection string is.

Re^5: dbi:ODBC change Port
by bliako (Monsignor) on Nov 10, 2022 at 11:49 UTC

    are the three dots part of your dsn?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148091]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found