Hi,

I tried that before but it doesn't change anything. Interestingly if I exclude the UID and PWD and just use
$conn->Open("DSN=$dsn");
I get
Cannot connect to MyDSN : OLE exception from "Microsoft OLE DB Provide +r for ODBC Drivers" : [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ' +(null)'. Reason: Not associated with a trusted SQL Server connection. Win32::OLE(0.1502) error 0x80004005: "Unspecified error" in METHOD/PROPERTYGET "Open" at adodb.pl line 12.
What am I supposed to have when calling the open routine? Are there other parameters that I should/can use?

I've set up the System DSN with the correct username/password - the ODBC control panel can connect successfully.

Maybe this is more of a Windows question than a Perl one. Any ideas?

Andrew

UPDATE : apparently this is something to do with the server being set up for Windows authentication only, and not Mixed Mode authentication. But why can my ODBC control panel connect OK, but not my Perl script?

In reply to Re: Re: Connecting to MS SQL using ADODB and ActivePerl by qadwjoh
in thread Connecting to MS SQL using ADODB and ActivePerl by qadwjoh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.