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

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.

You need the 64-bit Microsoft Access Database Engine 2010 Redistributable
http://www.microsoft.com/downloads/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&displaylang=en
Then try
Microsoft Access Text Driver (*.txt, *.csv)
for the driver name.
AFAIK, all 64-bit ODBC drivers from the Microsoft Access Database Engine 2010 64-bit Redistributable have slightly changed their driver names, I guess to differentiate them from their 32-bit counterparts.

I had this exact problem and the recompiling to target x86 specifically worked! Note that in order to do this I had to specify the Target CPU in the advanced compiler setting dialog - Project Menu> Properties> Compile tab> Advanced Compile Options button.
Before finding this forum entry I did install the Microsoft Access Database Engine 2010 Redistributable (32-bit) but I don't know if that had any affect on this issue.
As mentioned above, when the executing process is 32-bit (in this case compiling against x86 makes the app 32-bit specific) the application will use the drivers from C:\Windows\SysWOW64\odbcad32.exe.
Thanks Cameron.

We were doing this from ASP.Net and got it working on Windows 2012 just by moving the one site into a separate app pool that had "32-bit Enabled" turned on in the advanced settings for the App Pool.

A lot of people seem desperate here, I want to offer a few solutions. But, first I want to highlight what a dated proprietary trash idea from the 90s this is.
Use Unix ODBC to host the text file from Linux which the docs (seem to) claim to support an implementation of the Microsoft text driver
A better option would be of course to import the CSV into PostgreSQL.
I would suggest just doing this with \COPY and dropping the notion of a CSV.
You can maintain the CSV with PostgreSQL acting as a server with the Foreign Data Wrapper (file_fdw).
If you don't want to run an RDBMS, the modern way would be to use SQLite. This is a great idea if you don't need the server/client model.
The ODBC->text interface is especially insane, because ODBC doesn't define configuration beyond connection (so I assume there are lots of assumptions there).

Related

OraOLEDB.Oracle provider is not registered on the local machine (VS 2013)

I had install a Visual studio 2013 ultimate version and oracle 11g express edition (11.2.0.2.0 64 bit) in my pc.
I tried to open a existing project and try to connect the database, but it throw me the error above. as long as I refresh the database OR conn.open(), it will throw me "OraOLEDB.Oracle provider is not registered on the local machine".
Anyone has experience this issues? or any method that might help on this? I have struggle with this problem for few days.
Your comment and suggestion is much appreciated!!!
Looks like you did not install the "OraOLEDB.Oracle" - it is not included by default.
Check your options in Oracle Universal Installer or you can download it from here 64-bit Oracle Data Access Components (ODAC) Downloads
Note, since you installed 64 bit version of Oracle, you also have to compile your application as "x64", otherwise it does not work.

is there a 64-bit msdasql for windows 7?

I am using Windows 7 (x64bit) Ultimate.
I have both ODBC32 and ODBC64 Managers that I can access via Start.
The default appears to be the ODBC64.
However I do not see MSDASQL -Microsoft OLEDB for ODBC listed.
I wonder if it exists. I see some references to 64Bit MSDASQL for Windows Server 2003.
The IBM 64bit for ODBC seems to work (I heard) but not tried.
Now I would like to know if any one knows the link for 64-bit MSDASQL for Windows 7. Microsoft seems to have deprecated MSDASQL and I am not sure of the status of this story.
These issues came up while setting up a linked server in SQL Server 2012 for SQL (SAP) SqlAnywhere server.
I am not sure how I missed. This link allows you to download the Microsoft Access Database Engine 2010 Redistributable
http://www.microsoft.com/en-us/download/details.aspx?id=13255
The details of this indicates both ODBC and OLEDB as copied from the Microsoft Web Site:
"This download will install a set of components that facilitate the transfer of data between existing Microsoft Office files such as Microsoft Office Access 2010 (*.mdb and .accdb) files and Microsoft Office Excel 2010 (.xls, *.xlsx, and *.xlsb) files to other data sources such as Microsoft SQL Server. Connectivity to existing text files is also supported. ODBC and OLEDB drivers are installed for application developers to use in developing their applications with connectivity to Office file formats. "
There is no MSDASQL x64 bit for Windows 7. There is one for Windows Server 2003. I finally was able to create a linked server in SQL Server 2012 Express using the SAOLEDB.16 from Sybase/SAP.
Although I replied myself that there is no MSDASQL(x64)based on some 'deprecated items' information I am still looking at it.
Here is a link to the same question on MSDN:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/3c715023-4322-4bc6-a2c8-64a873f87e46/can-someone-confirm-the-architecture-of-this-file-preferably-microsoft-guys?forum=sqldatabaseengine#db5ed4e2-2391-4062-b34d-1f1b11431e1e

Which Oracle drivers do I need for ASP.NET 4.5?

I am trying to install the correct Oracle drivers on my development machine. I'm creating an ASP.NET web site and every time I run I get an error saying that says "The provider is not compatible with the version of Oracle client". I have tried both 32-bit and 64-bit Oracle drivers but have still had no luck. Can someone lead me to a link for the drivers I need based on my specs?
I'm using Windows 8 64-bit. The database is Oracle 11.2.0.2.0 - 64 bit.
The ODAC112021Xcopy_x64.zip might give you the dll's and client you'll need. Take a look at this previous answer for more detail about deployment of the application.

'Microsoft.ACE.OLEDB.12.0 is not registered in the local machine.'

I have installed Microsoft Access Database Engine 2010 Redistributable http://www.microsoft.com/en-us/download/details.aspx?id=13255 on the Windows 2008 server. However, when I ran my web application to import a spreadsheet table to the database. It complains with the error message - "Microsoft.ACE.OLEDB.12.0 is not registered in the local machine."
I have tested my code and works in my Windows 7 local machine. Any idea?
There is a problem with Microsoft.ACE.OLEDB.12 when AccessDatabaseEngine x86 or x64 2010 is installed.
I have long attempted to use the SSMS (2005-2008-2008R2-2012) Export Wizards to export large tables onto Excel and I needed the AccessDatabaseEngine installed to be able to do that.
However, regardless of the MS Office version (2010, x86 or x64, or whatever it is), the 2010 version of AccessDatabaseEngine will not work towards registering the provider.
The solution is to download and install the previous one which is none other than the 2007 x86 one.
This one will work even if Office or SQL Server or VS are x64.
Download it from here http://www.microsoft.com/en-us/download/confirmation.aspx?id=23734
Now, any other propagated issues revolving around the notorious failure to register "the provider" on the local machine for the Microsoft.ACE.OLEDB.12 should be resolved by the above.
Feel free to paste me your experiences on this matter.

"The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine"...DNN

I'm trying to get a new DotNetNuke site up and running on our 64-bit server, and I'm encountering the following error message:
"The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine"
I know from experience that you run into this when you target a 64-bit assembly on a 64-bit machine (there is no 64 bit OLE-DB provider currently). In that case, I simply target the x86 in Visual Studio and everything works fine.
But in this case, the site uses dynamic compilation, so there's no simple place to specify that I need to target x86. Any thoughts?
TIA.
You could change your app pool that you're running that site under to run as a 32 bit application. In the IIS7 manager, its under "Advanced Settings" of your app pool, and then set "Enable 32-bit Applications" to true.
You could also do this with AppCmd from a console with the following:
appcmd apppool set /apppool.name:MyNukeSite /enable32BitAppOnWin64:true
In IIS6 - you could try something like this (2 lines here, run aspnet_regiis when finished changing the metabase value)...
cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
aspnet_regiis.exe -i
See the following for more info:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5d306956-b2a2-4708-9bb9-72a395d474bb.mspx?mfr=true
http://blogs.msdn.com/irfanahm/archive/2008/12/15/how-to-use-a-32-bit-dll-in-asp-net-page-which-is-hosted-on-64-bit-iis.aspx
http://support.microsoft.com/kb/895976
HI, Now the Microsoft has released the 2010 Office System Driver Beta: Data Connectivity Components which is supported both in 32 bit as well as 64 bit OS. So using this driver instead of the traditional Microsoft.Jet.OLEDB.4.0 driver will give us a 64 bit application running on a 64 bit server (that is what we really need).
Though this is in beta, it worked fine for me.
You can download this driver from 2010 Office System Driver Beta: Data Connectivity Components
Thnks
You shouldn't try to target your application to 32-bit in which case you are losing the advantages of using 64-bit system. As aaa has pointed out, you can use the latest Access Database Engine 2010 to address this issue. Please refer to my blog post for complete solution.
Hope it helps.

Resources