"Exception TDBXError in module xxx.exe at xxx. Unable to load dbxmys.dll (errorCode126). It may be missing from the system path."

StackOverflow https://stackoverflow.com/questions/18255235

  •  24-06-2022
  •  | 
  •  

Question

I have installed MySQL on a client machine, created and populated the databases – MySQL is up and running. I then copied dbxmys.dll and libmysql.dll from my machine to the Windows/system32 folder of the client and copied the compiled project EXE file. On executing the project I get the error

"Exception TDBXError in module xxx.exe at yyy. Unable to load dbxmys.dll (errorCode126). It may be missing from the system path."

I have also tried to copy dbxmys.dll and libmysql.dll to the same folder as the executable but that did not work either.

Was it helpful?

Solution

Most plausible explanation, as so often has been the case, is that your have a 32 bit process on a 64 bit machine. In that case the file system redirector means that 32 bit processes that access System32 get redirected to the 32 bit system directory, SysWOW64. That's where you should put the files, if indeed the system directory is where they need to go.

Another possible failure mode could be that you have 64 bit DLLs and a 32 bit process. Or vice cersa.

That said, the system directory is for, well, system files. And applications should not modify it. So, putting the DLLs in the application directory would seem to be the right thing to do. You tried that without success. Hard to say why it failed. Perhaps there are further dependencies. Debug this using Dependency Walker in Profile mode.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top