32-bit Text drivers (Microsoft Access , Microsoft Excel and Text files ) from a 64 bit application on windows 7

32bit-64bit

Hi i have an application developed on XP with Text ODBC drivers. But when i deployed on Win 7 with office 2007, i have connection issues.

<add key="SQLConnection.TextConnectionString" value="Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\Data\;Extensions=asc,csv,tab,txt;Persist Security Info=False" />

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified


i have googled every solutions like installing the following

http://blogs.msdn.com/b/sqlblog/archive/2009/12/29/how-to-connect-to-file-based-data-sources-microsoft-access-microsoft-excel-and-text-files-from-a-64-bit-application.aspx

Microsoft Access Database Engine 2010 Redistributable (32-bit)

2007 Office System Driver: Data Connectivity Components

after all of those, in my datasources(ODBC), it still only shows "SQL native client/SQL server/SQL server native client"

in the C:\Windows\SysWOW64\odbcad32.exe

i can see all the x32 drivers, but how can i modify my connection strings to access 32-bit Microsoft Text Drivers or are there any alternative solutions?
Thanks

Best Answer

I'm pretty sure it'll work automatically (even on a 64-bit machine) as long as the executing process is 32-bit.

Try recompiling to target x86 specifically.

Related Topic