Page 1 of 1

Connection with MySql

Posted: 15.03.2013, 19:39
by The_Immortal
I'm going to connect my apllication with MySql.

But when I try to change the Connect option of TZConnection to true value I get the error:

Image

But I've libmysql.dll from (c:\Program Files\MySQL\MySQL Connector C 6.0.2\lib\opt\) and it's located in the project folder. And also I copied it to the system32 folder.

Could you help me please?

Thank you!


P.S. I've also tried to set the library into the LibraryLocation option:

Image

But finally got the same error as above...

Posted: 15.03.2013, 20:28
by The_Immortal
I've solved the issue!

The problem was I've 64x OS and my libmysql.dll was for 64x. But C++ Builder XE2 is 32x so I need to use libmysql.dll for 32x. That's all.

EgonHugeist, but I've the question. Where should I place libmysql.dll?

Some people say it should be placed into project folder.
So I copied libmysql.dll in the project folder and it's still can't be found.

Why?

Waiting for your answer!

Posted: 18.03.2013, 08:01
by marsupilami
Hello The_Immortal,

maybe this is because newer Delphi versions create subfolders for every build configuration like win32/debug and win32/release in your project folder? This way the executables probably don't get placed in the same folder as your library?
Best regards,

Jan