How to make a .exe 64 Bit useable
-
Hi, I made a tool to read a .mdb File, everything works fine except on a 64Bit Machine... To connect to the database I use OLEDB 4.0, but it seems that 64x does not provide this. How could I compile this compatible?? :doh:
OleDbConnection con = new OleDbConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=" + lblDATABASE.Text);
con.Open(); -
Hi, I made a tool to read a .mdb File, everything works fine except on a 64Bit Machine... To connect to the database I use OLEDB 4.0, but it seems that 64x does not provide this. How could I compile this compatible?? :doh:
OleDbConnection con = new OleDbConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=" + lblDATABASE.Text);
con.Open(); -
I had a similar problem and strangly, by adding an App.Config file to my project (even if it is just empty) the connection then works. Right click your project, choose add item --> new and find the template 'config', normally it should automatically name it App.config. Press OK. recompile and try again.
V.
-
Hi, I made a tool to read a .mdb File, everything works fine except on a 64Bit Machine... To connect to the database I use OLEDB 4.0, but it seems that 64x does not provide this. How could I compile this compatible?? :doh:
OleDbConnection con = new OleDbConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=" + lblDATABASE.Text);
con.Open();Compile it to x86.
I cannot remember: What did I before google?
-
Hi, I made a tool to read a .mdb File, everything works fine except on a 64Bit Machine... To connect to the database I use OLEDB 4.0, but it seems that 64x does not provide this. How could I compile this compatible?? :doh:
OleDbConnection con = new OleDbConnection(
@"Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=" + lblDATABASE.Text);
con.Open(); -
Compile it to x86.
I cannot remember: What did I before google?
-
Yeah I already tried this, but doesn't work.. I tried "any cpu" / "x86" / "x64" to build.
You have to set it in the "project properties", in the "build" tab, "platform target". I had the same problem with an old application using access, and it worked fine for me.
I cannot remember: What did I before google?
-
Thanks for your replies, it seems that the .exe need the manifest. Now it works =) /closed
ok, if this worsk for you it also fine.
I cannot remember: What did I before google?
-
Thanks for your replies, it seems that the .exe need the manifest. Now it works =) /closed
OK, I don't know what you did that required a manifest, but this problem, as you decribed it, only needed to be compiled to target x86 CPUs. The reason why it doesn't work is because there are no 64-bit providers for Access databases. Since you can't mix 32-bit and 64-bit code in the same process, using an Access database will fail.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
You have to set it in the "project properties", in the "build" tab, "platform target". I had the same problem with an old application using access, and it worked fine for me.
I cannot remember: What did I before google?