Search code examples
phpms-accessjoomlaodbc

Enforce Connection to a 32bit Access Database from a 64bit php website


I have a Joomla Website and within it I created a custom Module, that should connect to this Access Database I have. However when trying to connect to it it can't find this database. As far as I found out this is because the connection string I registered as a odbc-datasource is 32bit, but the PHP is a 64bit version and therefor also looks for a 64bit odbc-datasource. So is there a possibility to enforce it to take the 32bit datasource?


Solution

  • different bit size programs can't talk to each other. There is no difference between Access x32 and x64 format files. So there is no such thing as a x32 bit Access database.

    What IS differnt howver is the database driver you choose. There is a x32 bit driver, and a x64 bit driver. If your web site is running as x64 bits, then the Access database driver must also be x64 bits.

    Windows for about 20 years ships with a Access x32 bit driver. this driver thus does not need to be installed, but it only x32 bits, and it ONLY works with mdb files. If you are using the newer accDB file format, then you need to install a later version of the Access database engine (the old one is called JET, the newer one is called ACE). You need the ACE data engine to read accDB files. You also need ACE if you going to read mdb files and ALSO use x64 bit software. So only a x32 bit version of JET exists (reads mdb files only).

    If you want to use x64 bits and read mdb files, or accDB files, then you have to install the 64 bit version.

    Since the dawn of computers? you can no more use x32 bit software to talk to say a 8 bit Atari computer. You have to match up the bit size of all code and libraries you are using - including driver software to connect to the database. Mix and match of different bit size software is not allowed, and it been that way since the first computer shipped to a home.