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

Re^2: dbi:ODBC change Port

by Corion (Patriarch)
on Nov 10, 2022 at 12:50 UTC ( [id://11148098]=note: print w/replies, xml ) Need Help??


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

This does not do what you think:

DBI->connect("dbi:ODBC:Driver={$ODBCdriver};Server=$SQLserver; Port=$S +QLport;Database=$SQLdatabase;UID=$SQLuser;PWD=$SQLpassword", {PrintError => 0, RaiseError => 1, FetchHashKeyName => 'NAME_lc'} )

The second argument to ->connect must be undef or the database user, and the third argument must be the password. The fourth argument can optionally be the connection options, given as a hash.

Your code "works" because you specify user and password in the DSN and that seems to override the arguments given to ->connect.

I would recommend you change your code to the four-argument version.</>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (11)
As of 2024-04-19 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found