Sorry I took so long to reply. I was both out of touch for a few days and I wanted to be sure of my answer so as not to lead you astray.

To that end, I have tested several theories about this scenario - and here is what I have found:

When I used a MyODBC driver (for - MySQL on the windows platform) it worked just fine - no hitches at all when I did not spell out the user id and pass in the connect.

However, the same code on a *nix box using the *nix ODBC (a BSD box in particular) it worked too!

This got me to thinking - what about a non-MySQL/MyODBC connection.. like with MS-SQL specifically ..and guess what. It failed without the user/pass.

My hunch was this: the part that had been working for me was that I had been using the MyODBC driver not the standard ODBC for Access or MS-SQL. Unfortunately, there is little to no choice on ODBC drivers for MS-SQL on the Windows platform as far as I know.

I tried several combinations of things to get it to work, but to no avail. I even tried using named-pipes and all the other protocols with MS-SQL as well - nothing worked.

It appears that the Microsoft ODBC driver does not pass on the DSN information as well as the MyODBC version does. What is the point in specifying the user and pass in the DSN if it wont USE it?  At this point I got frustrated and finally gave in and put a call in to the help team at MS (I still get free calls there thank goodness). 

According to them, the login info on the MS-SQL ODBC driver is ONLY used for initial configuration to gather the setup information and then is discarded before the ODBC connection is saved. Whereas, the ORACLE ODBC driver works more like the MySQL version as well. Oddly enough, their own spec for ODBC drivers seems to dictate that it CAN (should) save the authentication information.

I hope this helps - I know that I sure learned something new.

*G*

In reply to Re: Re: Re: Re: Re: Win32::ODBC vs. Win/MSSQL 2000 by growlf
in thread Win32::ODBC vs. Win/MSSQL 2000 by Ardenstone

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.