Access 32 bit odbc from x64 bit application
-
13 Maret 2012 10:35
1. I have application that is x64 bit [which is not allowed to change as per our business demands]
2. I have office 2007/2010 installed on my machine [both are 32 bit]
3. I want to read MS Access file i.e accdb from my application
Question:
1. What are different the ways that I can use to do this.
2. You can suggest method using ODBC, OLE jet engine etc
Semua Balasan
-
13 Maret 2012 11:03
Hi,
just use the 64Bit Runtime to access the Access Database.
Office, Access Runtime and the database engine are available in 64 bit:
- http://www.microsoft.com/download/en/details.aspx?id=13255 Access Database Engine
- http://www.microsoft.com/download/en/details.aspx?id=10910 Access Runtime (Not required - first link is enough)With kind regards,
Konrad
- Disarankan sebagai Jawaban oleh AdaveshMVP 13 Maret 2012 11:06
- Ditandai sebagai Jawaban oleh Mike FengMicrosoft Contingent Staff, Moderator 26 Maret 2012 12:47
-
13 Maret 2012 11:16
Thanks for you reply, but for installing 64 bit driver I need to uninstall 32 bit driver.
I think this wont be allowed on user side. Is there any other way to read access file with above mentioned condition.
-
13 Maret 2012 11:40
Hi,
you are correct, you cannot install the 64 bit version next to the 32 bit version. But if the main application needs to stay on 64 Bit you might be able to create a 32 Bit COM Component which is doing the database access for you. At least that could be worth a try if this is really a requirement.
The core idea behind it is the as it is inside http://blogs.microsoft.co.il/blogs/arik/archive/2011/05/30/how-to-use-a-net-4-based-dll-from-net-2-based-application.aspx - but there a .Net 4 Component was placed inside a COM Component to be used from a .Net 2 application. At the moment I am not 100% sure, that this will work - but it could be worth a try.
Another possibility could be to simply have 32Bit parts that you access on some other way. So your application could start a 2nd 32Bit application and use some other interface. So you could simply set up some WCF Service/Client model.
Just some thoughts but I would carefully check what you really need. If you have a client application and 32Bit Office is an requirement: Then just compile it as 32Bit bit and its running. And if it is a server application where you need the memory: Go fully on 64Bit. Building a workaround as I described is a crappy solution that increases the complexity and increases the development time and the chance that your application will fail. (But of course: If the customer really requests something like that .... And if it is a smiple module e.g. an import module only, it no longer sounds that bad ...)
With kind regards,
Konrad
- Disarankan sebagai Jawaban oleh Mike FengMicrosoft Contingent Staff, Moderator 14 Maret 2012 7:50
- Ditandai sebagai Jawaban oleh Mike FengMicrosoft Contingent Staff, Moderator 26 Maret 2012 12:47
-
14 Maret 2012 9:12
Hi,
you are correct, you cannot install the 64 bit version next to the 32 bit version. But if the main application needs to stay on 64 Bit you might be able to create a 32 Bit COM Component which is doing the database access for you. At least that could be worth a try if this is really a requirement.
The core idea behind it is the as it is inside http://blogs.microsoft.co.il/blogs/arik/archive/2011/05/30/how-to-use-a-net-4-based-dll-from-net-2-based-application.aspx - but there a .Net 4 Component was placed inside a COM Component to be used from a .Net 2 application. At the moment I am not 100% sure, that this will work - but it could be worth a try.
Another possibility could be to simply have 32Bit parts that you access on some other way. So your application could start a 2nd 32Bit application and use some other interface. So you could simply set up some WCF Service/Client model.
Just some thoughts but I would carefully check what you really need. If you have a client application and 32Bit Office is an requirement: Then just compile it as 32Bit bit and its running. And if it is a server application where you need the memory: Go fully on 64Bit. Building a workaround as I described is a crappy solution that increases the complexity and increases the development time and the chance that your application will fail. (But of course: If the customer really requests something like that .... And if it is a smiple module e.g. an import module only, it no longer sounds that bad ...)
With kind regards,
Konrad
Above question was raise since i have access 32 bit library via 64 application.
So what I did is mention below....
In my application using WCF [sever/client] - [use Named pipe]
1. I have Sever having one method ReadDB which returns datatable. [32 bit] - fill database using OleDb
2. when client calls this method and it returns error. [64 bit]
Error : [There was an error reading from the pipe: The pipe has been ended. (109, 0x6d).]
In this senario: i am using NetNamedPipeBinding
My probem:
- is there any other way in which server can pass datatable data to client.
- server is x86 and client is x64
-
14 Maret 2012 9:38
Can you give more details what you exactly tried? If you want to work on that solution you should even consider closing this thread at this point and open a new point with your WCF Problems inside the WCF forum.
From my experience, WCF calls can run into trouble if oyu try to transfer large amount of data. There are a few settings inside the configuration script you could do (e.g. setting maxReceivedMessageSize and timeouts), we decided to simply reduce the amount of data sent in one request (So we build it a little bit like Active Directory - data is sent in "pages".) Maybe that is also your problem? But it is only a guess but if the application has to be 64Bit I simply asume that it needs to handle a lot of data in memory.
But I have to confess that I am not a WCF expert - I know the basics so far and stuff that I needed at work but so far I never found time to fully dig into the whole WCF with all its possibilities. So it is really a good idea to go ot the WCF forum at http://social.msdn.microsoft.com/Forums/en-US/wcf/threads.
With kind regards,
Konrad
-
20 Maret 2012 9:42Moderator
Hi Amit,
Thank you for posting on MSDN Forum.
How about this issue now?
Do you have any updates?
If you have any concerns, please feel free to let me know.
Best regards,
Mike Feng
MSDN Community Support | Feedback to us
Please remember to mark the replies as answers if they help and unmark them if they provide no help.