Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to make a .exe 64 Bit useable

How to make a .exe 64 Bit useable

Scheduled Pinned Locked Moved C#
databasetutorialquestion
11 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mschauder
    wrote on last edited by
    #1

    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();

    V T M 3 Replies Last reply
    0
    • M Mschauder

      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();

      V Offline
      V Offline
      V 0
      wrote on last edited by
      #2

      You need to add the App.config file I believe.

      V.

      M 1 Reply Last reply
      0
      • V V 0

        You need to add the App.config file I believe.

        V.

        M Offline
        M Offline
        Mschauder
        wrote on last edited by
        #3

        sry I don't know what you mean. :doh:

        V 1 Reply Last reply
        0
        • M Mschauder

          sry I don't know what you mean. :doh:

          V Offline
          V Offline
          V 0
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • M Mschauder

            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();

            T Offline
            T Offline
            Thomas Krojer
            wrote on last edited by
            #5

            Compile it to x86.

            I cannot remember: What did I before google?

            M 1 Reply Last reply
            0
            • M Mschauder

              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();

              M Offline
              M Offline
              Mschauder
              wrote on last edited by
              #6

              Thanks for your replies, it seems that the .exe need the manifest. Now it works =) /closed

              T D 2 Replies Last reply
              0
              • T Thomas Krojer

                Compile it to x86.

                I cannot remember: What did I before google?

                M Offline
                M Offline
                Mschauder
                wrote on last edited by
                #7

                Yeah I already tried this, but doesn't work.. I tried "any cpu" / "x86" / "x64" to build.

                T 1 Reply Last reply
                0
                • M Mschauder

                  Yeah I already tried this, but doesn't work.. I tried "any cpu" / "x86" / "x64" to build.

                  T Offline
                  T Offline
                  Thomas Krojer
                  wrote on last edited by
                  #8

                  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?

                  M 1 Reply Last reply
                  0
                  • M Mschauder

                    Thanks for your replies, it seems that the .exe need the manifest. Now it works =) /closed

                    T Offline
                    T Offline
                    Thomas Krojer
                    wrote on last edited by
                    #9

                    ok, if this worsk for you it also fine.

                    I cannot remember: What did I before google?

                    1 Reply Last reply
                    0
                    • M Mschauder

                      Thanks for your replies, it seems that the .exe need the manifest. Now it works =) /closed

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #10

                      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

                      1 Reply Last reply
                      0
                      • T Thomas Krojer

                        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?

                        M Offline
                        M Offline
                        Mschauder
                        wrote on last edited by
                        #11

                        Yeah I know! I already tried this, without success! :)

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups