AcquireConnection method - DSN contains an architecture mismatch between the Driver and Application
-
Monday, August 09, 2010 2:40 PMI am building a package programatically by loading an existing SSIS package (application.LoadPackage(...). In the package that I am loading, I have set the project properties for Run64BitRunTime to false. If I run this package by itself, it works just fine. As the new package is building, the DataSource AcquireConnection method is called. I then receive the error: {"ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application"}. What is the appropriate setting for the C# project that builds the package. Thanks.
All Replies
-
Monday, August 09, 2010 2:44 PM
You are using 64-bit odbcad32.exe to configure a DSN that connects to a 32-bit driver.
Use the 32-bit odbcad32.exe to configure the DSN.
- Proposed As Answer by alhann Saturday, January 01, 2011 8:07 PM
-
Monday, August 09, 2010 2:46 PMAs I mentioned, it works just fine in the base package, which contains the connection object to the ODBC data source. Its only when I load this package programtically and add on to it does the error occur.
-
Monday, August 09, 2010 2:51 PMHow did you run the base package?
-
Monday, August 09, 2010 2:52 PMThrough the Visual Studio development environment
-
Monday, August 09, 2010 2:54 PM
THIS IS NOT YOUR ANSWER....
to give you an idea how it works here is an good example ....
Because you can run a package in BIDS doesnt mean that it will work on production
i.e Assuming SQL2005 and yourbox and production box are both 64 bit
- a package with a Excel source file , will work on you station using BIDS (your box or computer is 64bit)
BUT setting the same package on production using a SQL job wont work because the default execution if to run the packages are a 64bit you have to redirect them to a 32 bit execution file .
SO Manikandan is rightyou are not using the right odbcad32.exe.
Sincerely SH -- MVP, MCITP 2008, MCTS 2008 & 2005 -- Please kindly mark the post(s) that answered your question and/or vote for the post(s). -
Monday, August 09, 2010 3:01 PMAre you using BIDS in 64 bit server?
-
Monday, August 09, 2010 3:02 PMThe program that builds the package is running on my PC. Its not the package execution that is the issue, its the programmatic package build.
-
Monday, August 09, 2010 3:03 PM
My environment is Windows 7, just recently switched. Used to work fine under XP
-
Monday, August 09, 2010 4:49 PM
I solved the issue by changing the Platform target project setting from Any CPU to x86.- Marked As Answer by Todd McDermidMVP, Moderator Monday, August 09, 2010 5:08 PM
-
Monday, August 09, 2010 5:20 PM
can you please provide more details. thanks you.
Sorry I clicked on this post as an answer, by mistake, sorry
Sincerely SH -- MVP, MCITP 2008, MCTS 2008 & 2005 -- Please kindly mark the post(s) that answered your question and/or vote for the post(s).- Proposed As Answer by Nik - Shahriar Nikkhah Monday, August 09, 2010 6:11 PM
- Edited by Nik - Shahriar Nikkhah Monday, August 09, 2010 6:46 PM
-
Monday, August 09, 2010 5:23 PM
Yes, in Visual Studio, I went to Project Properties, then clicked on the Build tab. I then selected x86 from the Platform Target drop down. Remember this is a C Sharp project which is building a SSIS package (programatically).- Proposed As Answer by Nik - Shahriar Nikkhah Monday, August 09, 2010 6:11 PM
-
Monday, August 09, 2010 6:11 PM
Hi garysklar
Thanks for the reply; I think that you should select your post as a final answer.
Brilliant, good luck
Sincerely SH -- MVP, MCITP 2008, MCTS 2008 & 2005 -- Please kindly mark the post(s) that answered your question and/or vote for the post(s).- Proposed As Answer by Maria Esteban Thursday, February 21, 2013 9:14 AM
-
Saturday, January 01, 2011 8:06 PM
Thank you Manikandan. This is the only thing that worked for me (changing the target to x86 did not help in Win7-64bit/VS2008/SQLExpress2008R2). I just created a duplicate 32bit SystemDSN for the existing 64bit DSN. In Win7 I found the 32bit odbc admin at:
C:\Windows\SysWOW64\odbcad32.exe
-
Thursday, August 04, 2011 10:22 AM
Hi Guys
In addtion to the answer, given by garysklar, if you get this same error in BIDs itself while the SSIS packages, you can set the below project property to false to make it work
Project properties --> Debuging --> Run64BitRuntime to False
-
Thursday, April 19, 2012 1:47 PMI had the same issue...and used the same method as alhann...worked for me...Thanks
-
Friday, August 10, 2012 8:00 PMI did the same as well, changing the Run64BitRuntime to false. That worked for me. Is there any downside to this. Is it throttling the entire project down to running as a 32 bit app?
-
Sunday, November 04, 2012 12:51 PM

