Mysql set LibraryLocation to exact path

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
drama22
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 12.08.2014, 09:49

Mysql set LibraryLocation to exact path

Post by drama22 »

any idea how to set LibraryLocation path to exact path ?

example i just currently use it like that

Code: Select all

dbconnect.LibraryLocation := 'C:\Users\username\Desktop\project\mysql\libmysql.dll';
this will give an error if i use it on other computer because the username will be different any idea how to make it in the main application folder ?
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Mysql set LibraryLocation to exact path

Post by EgonHugeist »

It's never a good idea to use such folders.. Why don't you use a sub-folder of you application installation folder and generate the Location "on the fly"? Or use the system-paths.....
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Mysql set LibraryLocation to exact path

Post by marsupilami »

Hello drama22,

usually it should be enough to set library location to libmysql.dll if the library is located in your application folder. If you want to place it in a subfolder, you could do something like

Code: Select all

dbconnect.LibraryLocation := ExtractFilePath(ParamStr(0)) + 'mysql\libmysql.dll';
Maybe you should implemet a checkl with fileexists before setting that value.
Best regards,

Jan
drama22
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 12.08.2014, 09:49

Re: Mysql set LibraryLocation to exact path

Post by drama22 »

marsupilami wrote:Hello drama22,

usually it should be enough to set library location to libmysql.dll if the library is located in your application folder. If you want to place it in a subfolder, you could do something like

Code: Select all

dbconnect.LibraryLocation := ExtractFilePath(ParamStr(0)) + 'mysql\libmysql.dll';
Maybe you should implemet a checkl with fileexists before setting that value.
Best regards,

Jan
Thanks thats solve my issues .
Post Reply