Mysql set LibraryLocation to exact path

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

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

Mysql set LibraryLocation to exact path

Postby drama22 » 18.08.2014, 21:11

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 Dev Team
Zeos Dev Team
Posts: 1734
Joined: 31.03.2011, 22:38

Re: Mysql set LibraryLocation to exact path

Postby EgonHugeist » 24.08.2014, 13:47

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.....
King regards, Michael

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

Image

marsupilami
Gold Boarder
Gold Boarder
Posts: 625
Joined: 17.01.2011, 14:17

Re: Mysql set LibraryLocation to exact path

Postby marsupilami » 25.08.2014, 09:15

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

Postby drama22 » 25.08.2014, 19:12

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 .


Return to “MySQL”

Who is online

Users browsing this forum: No registered users and 1 guest