Robed ones,
I have been using Win32::ODBC just fine on WinNT4 w/MSSQL 7. My department just got another web server with 2000 (both NT & MSSQL) and suddenly I have to set the Username and Password in my DSN call. I'd much rather just call the DSN connection and have it use the defaults.
Here's what I used to do:
use Win32::ODBC
my $DSN = "myDSN";
my $db = new Win32::ODBC($DSN);
If I try that on the 2k box, I get the following error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Is there a monk who has solved this in any way other than writing:
my $db = new Win32::ODBC("DSN=$DSN;UID=$DSNuserName;PWD=$DSNpassword")
+;
Note that this is a System DSN and since the second one works great I'm fairly sure my SQL user, etc. are correct. I've been looking towards DBI, but would rather not re-write all these apps right now.
Thanks,
Ardenstone
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.