[Lazarus] IDE

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] IDE

Free Pascal - Lazarus mailing list
Dear, 

After retiring, I met Lazarus and I really enjoyed this IDE, for several reasons. However, I realized that objects that access Database of different types (PostgreSQL, MySQL, SQLite, etc.), require an effort to make it work. So, like the vast majority, I downloaded ZeosLib and as a step of magic everything worked right away.

So I decided to analyze the sources of ZeosLib to try to understand why, and it seems that the objects included in Lazarus require the libraries with their most precise configuration on the machine where the application is installed. ZeosLib allows the same libraries to be present in the same application installation folder. So I'd like to suggest that those objects that are already part of Lazarus may have the same behavior, so you do not need to download any other object to access the database.

A hug to everyone.

--
 
Eurico JB Silva
#22-992089960


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE

Free Pascal - Lazarus mailing list


On Fri, 15 Mar 2019, Eurico JB Silva via lazarus wrote:

> Dear,
>
> After retiring, I met Lazarus and I really enjoyed this IDE, for several
> reasons. However, I realized that objects that access Database of different
> types (PostgreSQL, MySQL, SQLite, etc.), require an effort to make it work.
> So, like the vast majority, I downloaded *ZeosLib* and as a step of magic
> everything worked right away.
>
> So I decided to analyze the sources of *ZeosLib* to try to understand why,
> and it seems that the objects included in Lazarus require the libraries
> with their most precise configuration on the machine where the application
> is installed. *ZeosLib* allows the same libraries to be present in the same
> application installation folder. So I'd like to suggest that those objects
> that are already part of Lazarus may have the same behavior, so you do not
> need to download any other object to access the database.

In lazarus you have complete control over where you want the libraries to be.
In code, you can also specify any path you want; It has been so since day 1.

Moreover, if you use the library loader component, you can specify the location
of the libraries exactly with a few clicks.

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list

My guess is that you are using Windows ;) If you are using Linux then there is a problem with your distro's library manager.

I am sure that it is recommended practice by MS to install dependencies in an application's folder. Otherwise there is a risk of stealth upgrades/downgrades. For that reason, IBX always checks the application folder first when looking for the Firebird DLL and only uses the registry to locate it and other well known locations, if it can't find it there. I would be surprised if Lazarus's SQL objects don't work that way as well.

On 15/03/2019 16:31, Eurico JB Silva via lazarus wrote:
Dear, 

After retiring, I met Lazarus and I really enjoyed this IDE, for several reasons. However, I realized that objects that access Database of different types (PostgreSQL, MySQL, SQLite, etc.), require an effort to make it work. So, like the vast majority, I downloaded ZeosLib and as a step of magic everything worked right away.

So I decided to analyze the sources of ZeosLib to try to understand why, and it seems that the objects included in Lazarus require the libraries with their most precise configuration on the machine where the application is installed. ZeosLib allows the same libraries to be present in the same application installation folder. So I'd like to suggest that those objects that are already part of Lazarus may have the same behavior, so you do not need to download any other object to access the database.

A hug to everyone.

--
 
Eurico JB Silva
#22-992089960



--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] IDE

Free Pascal - Lazarus mailing list


On Fri, 15 Mar 2019, Tony Whyman via lazarus wrote:

> My guess is that you are using Windows ;) If you are using Linux then there
> is a problem with your distro's library manager.
>
> I am sure that it is recommended practice by MS to install dependencies in an
> application's folder. Otherwise there is a risk of stealth
> upgrades/downgrades. For that reason, IBX always checks the application
> folder first when looking for the Firebird DLL and only uses the registry to
> locate it and other well known locations, if it can't find it there. I would
> be surprised if Lazarus's SQL objects don't work that way as well.

By defaault, they use the normal DLL loading mechanisms, which means:
first the application directory, then the PATH setting.
If you need special paths, you can do so in code...

Michael.
>
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus