Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: 'use database' for sqlserver

by mje (Curate)
on May 22, 2013 at 08:50 UTC ( #1034705=note: print w/ replies, xml ) Need Help??


in reply to 'use database' for sqlserver

The following works fine for me:

$ perl -le 'use DBI; my $h = DBI->connect("dbi:ODBC:DRIVER={Easysoft O +DBC-SQL Server};server=172.20.0.39\\SQLEXPRESS;UID=xxx;PWD=yyy;databa +se=master;")'

and if I put an unknown database in it fails to login.


Comment on Re: 'use database' for sqlserver
Download Code
Re^2: 'use database' for sqlserver
by fionbarr (Pilgrim) on May 22, 2013 at 13:54 UTC
    This one works:
    my $connect_string = "dbi:ODBC:DRIVER={SQL Server};SERVER={$server};UI +D=$username;PWD=$password;DATABASE=$db;"; $dbh = DBI->connect($connect_string);
    Thanks to all.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2015-07-04 23:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls