UPDATE:

I should add for completeness that I do have a 64-bit version of strawberry perl on this system, and I can't recally, but I *might* have been using that to test my code inadvertently, not the 32-bit perl like originally posted. I didn't realize that it was ambiguous until I remembered that we installed strawberry on this server, and it became the default app to run files with .pl extenstions, which is how I was testing it. So sorry for that confusion -- it may have not been so confusing to begin with.

To be clear, both 32-bit and 64-bit now work fine, but I can't vouch for which way I was testing it for the results of my original post, but it was likely that I was running the 64-bit perl when I thought I was running the 32-bit exe. Apologies to all, and many thanks to mvaline for help.

Hello,

This is a problem which I've solved, but I don't know how or why, and I am hoping for some illumination from someone for my own benefit and for posterity.

I have a 64-bit Windows 7 system onto which I must put 32-bit Perl (work constraint). I am using DBI to connect to a Microsoft SQL server. The issue I had was that after I registered the DSN through the app launched at %WINDIR%\SysWow64\odbcad32.exe, I tested my connection, and everything was fine, but I got the perl error which contained the string 'SQL-IM014' ... basically, an architecture mismatch error between 32-bit perl and a 64-bit driver.

Well, I hunted around and found that that directory is not the only place that a 'odbcad32.exe' executable lives... So I launched the one at %windir%\system32\odbcad32.exe, which didn't show my previously registered DSN as registered. So I registered that there, and now it works.

My question is: what is the difference between these two executables (as they are named the same)? For database with which I use R, I had to register my DSNs in the former .exe, as that is where my drivers showed up when I installed them (they do not show up in the .exe of the latter). But the ones I use for perl had to be registered in the latter.

I suspect others might have or will soon run into this problem, and I'd like any insight as to what's going on (I know that this is tangentially perl, but I'm thinking it's close enough to log as a question here).

Thanks, Matt

In reply to DBI Module, 32-bit Perl on 64-bit Windows 7: ODBC Connection confusion by mpettis

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.