Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Every new computer in my company undergoes the same software installation process; one program in particular needs to access a MS SQL Server database via ODBC. The program is then used by multiple domain users on the same computer at different times.

On Windows XP machines, I simply set up the ODBC connection as a System DSN. No matter what user logged in, the connection would work for him, and my job was done.

Recently, we get more and more Windows 7 machines, and this method doesn't seem to work anymore. The program doesn't recognize the connections I set up in System DSN, but it does recognize those in User DSN. The problem I have with this is that every time a user logs in on a computer for the first time, I get a call and need to install his or her own DSN.

What's the reason this works on XP, but not on 7? Have I been doing it wrong from the start?

Update: Maybe the reason isn't Windows 7, but the fact that the new computers run a 64-bit OS. I say this because when I ran a test application (source code here) on 64-bit Windows 7, accessing the User DSN worked fine, but accessing the System DSN gave the following error message:

IM014: The specified DSN contains an architecture mismatch between the Driver and Application

The Microsoft documentation indicates that this happens when a 32-bit driver is accessed on a 64-bit computer, or vice versa. This could very well be the problem, because when I switched the test application to 64-bit, the System DSN could be accessed.

The question now is: Why does this happen for System DSN, but not for User DSN - are there different drivers installed for the two? That would mean that I won't be able to use the System DSN any longer, because I have no influence on the software we need to use.

share|improve this question

2 Answers 2

up vote 5 down vote accepted
+50

The Microsoft article of Managing Data Sources says the following :

To manage a data source that connects to a 32-bit driver under 64-bit platform, use c:\windows\sysWOW64\odbcad32.exe. To manage a data source that connects to a 64-bit driver, use c:\windows\system32\odbcad32.exe. In Administrative Tools on a 64-bit Windows 8 operating system, there are icons for both the 32-bit and 64-bit ODBC Data Source Administrator dialog box.

If you use the 64-bit odbcad32.exe to configure or remove a DSN that connects to a 32-bit driver, for example, Driver do Microsoft Access (*.mdb), you will receive the following error message:

The specified DSN contains an architecture mismatch between the Driver and Application

To resolve this error, use the 32-bit odbcad32.exe to configure or remove the DSN.

Your application is evidently 32-bit. Have you used the right odbcad32.exe to define the DSN ?

share|improve this answer
    
No, I haven't; I had no clue there were two versions. I'm blown away - it works. Thank you! –  waldrumpus Aug 27 '12 at 8:45
    
Sorry I haven't handed out the bounty earlier; I thought this would happen automatically with marking your post as the accepted answer. –  waldrumpus Aug 31 '12 at 8:37
    
I don't think this is necessary anymore on Windows 7 64 bit. Running either 'version' brings up the same console with the same defined DSNs. Simply using the run dialog and typing in 'odbcad32.exe' and defining a DSN, I was able to access said DSN via my scripting languages. –  AndrewPK Apr 3 '13 at 14:18
    
@AndrewPK: The poster was running Windows 7 64-bit. –  harrymc Apr 3 '13 at 15:07

User Rights: Be sure, that the User has the ability to access the System-DNS or User-DNS. The situation here was, that Lotus-Notes ran as a service under the SYSTEM-User. There was no connectivity to ODBC. We changed the User for the Service and that solved the Problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.