Lazarus

Free Pascal => Database => Topic started by: phr0x on July 08, 2018, 10:17:14 pm

Title: Using dbexport
Post by: phr0x on July 08, 2018, 10:17:14 pm
Hello,

I would like to use dbexport within my program. When I try to add it via Package -> New Component, it does not show up.

I have Pascal on two Systems and its not showing up with both versions.
Not with version 1.6.2 and not with version 1.8.4.

Best Regards
Title: Re: Using dbexport
Post by: wp on July 08, 2018, 10:22:17 pm
You must install the package: "Package" > "Install/uninstall packages". In the right half of the window, "Available for installation", type "export" in the edit to narrow down the list. Find "lazdbexport 1.0" in the list. Select it. Click "Install selection" to move it to the left list. Then click "Save and rebuild IDE". After some time Lazarus will restart and you'll find the components on palette "Data Export".
Title: Re: Using dbexport
Post by: phr0x on July 12, 2018, 11:29:24 am
Thank you, that gives me the error Message

Quote
lazarus.pp(1,1) Fatal: Cannot find lazdbexport used by Lazarus[/quote
Any Idea? According to my search that is a pretty annoying error in laz that is not easy to fix?!

Best Regards
Title: Re: Using dbexport
Post by: maurobio on September 13, 2021, 03:30:59 pm
Hi,

I am right now finding this very same problem in Lazarus 1.8.2 for Linux. Has someone found a solution?

Best regards,
Title: Re: Using dbexport
Post by: af0815 on September 13, 2021, 03:43:39 pm
It should be at lazarus\components\dbexport\lazdbexport.lpk

If not you have a broken installation of lazarus. BTW: Lazarus 1.6.x and 1.8.x are old versions.
Title: Re: Using dbexport
Post by: maurobio on September 13, 2021, 03:49:38 pm
@af0815,

I have not other problems with that old installation (which by the way it is the one provided by the official repositories, and under Linux I try hard to avoid installing anything which come not out of them).

I opened the lazarus\components\dbexport\lazdbexport.lpk, compiled it without errors and attempted to install it, but it still refuses to appear in the component pallette.

Regards,

Title: Re: Using dbexport
Post by: wp on September 13, 2021, 03:54:35 pm
I opened the lazarus\components\dbexport\lazdbexport.lpk, compiled it without errors and attempted to install it, but it still refuses to appear in the component pallette.
I just checked Laz 1.6.4. It has "lazdbexport 0.1.1" in the right list of packages "available for installation" in "Packages" > "Install/uninstall packages". Selected it, clicked "Install selection", then "Save and rebuild IDE". When, after some time, the new IDE restarts I see the components on palette "Data Export"
Title: Re: Using dbexport
Post by: maurobio on September 13, 2021, 04:04:25 pm
@wp,

Now I got it!!!  I (re)opened the lazarus\components\dbexport\lazdbexport.lpk, compiled it without errors and now have been able to install it without further complaints. The components in the package now appear correctly in the component pallette.

Strangely, before opening and compiling directly the lazdebexport.lpk file (as per above), when I used the package manager it appeared as "installed" but did not appear in the component pallette; attempting to install it from there did fail.

Thank you very much.

With best wishes,
Title: Re: Using dbexport
Post by: maurobio on September 13, 2021, 04:07:52 pm
@wp,

But I am now having issues when attempting to install the package laz_fpspreadsheetexport_visual.lpk! It complains that the lazdbexport package cannot be found (but it now appears in the component pallette).

Any hints?

Best regards,
Title: Re: Using dbexport
Post by: Zvoni on September 13, 2021, 04:12:06 pm
Have you recompiled the IDE?
Title: Re: Using dbexport
Post by: maurobio on September 13, 2021, 04:14:02 pm
@wp,

I have the same problem when attempting to install the new FPSpreadsheetDataset package, even of lzdbexport does not appear in its list of dependencies.

It seems I will have to add manually the path to lazdbexport to each of these packages. Am I right?

With best regards,
Title: Re: Using dbexport
Post by: maurobio on September 13, 2021, 04:15:33 pm
@wp,

Yes, I have recompiled the IDE (and as I wrote above, the DbExport components are now visible in the component pallette).

Best regards,
Title: Re: Using dbexport
Post by: maurobio on September 13, 2021, 04:21:36 pm
@wp,

Ooops!!!!  %) I just restarted the IDE and now FPSpreadSheet appears correctly installed, in the Data Acess component pallette, and FPExport also appears in the Data Export pallette.

Everything seems OK now.

Thanks a lot for your help and patience.

With best wishes,
Title: Re: Using dbexport
Post by: wp on September 13, 2021, 04:23:26 pm
It seems I will have to add manually the path to lazdbexport to each of these packages. Am I right?
ABSOLUTELY NO! (Sorry for shouting...)

Never add paths to packages unless you absolutely know what you are doing.

If the IDE does not recompile as you describe there are probably some out-dated compiled units somewhere. Go to "Tools" > "Configure Build Lazarus"; in the "Cleanup box" check "Clean all" and "Switch after building to automatically" and click "Build". This erases existing compiled units and compiles everything newly. This is a general recipe for solving issues when a package cannot be installed due to unresolved dependencies.
Title: Re: Using dbexport
Post by: maurobio on September 13, 2021, 04:38:58 pm
@wp,

Fortunately, I have not changed manually any paths in any packages!  :-[

As I reported above, by restarting the IDE after compiling and installing each package, I got everything working smoothly.

Thanks again.

With best wishes
Title: Re: Using dbexport
Post by: maurobio on September 14, 2021, 02:50:52 pm
 :o

Unfortunately, as it turned out, the problem is not of a solution so simple as that...

When attempting to install any another component, the IDE kept complaining about missing packages which are in fact installed and I could not even rebuild the IDE itself anymore!

I then removed Lazarus completely from my system (including the configuration files in home directory) and did a fresh install. Right after that, I attempted to just rebuild the IDE (without installing any new component). I then get the IDE complaining that it "Cannot find lazcontrolsdsgn used by Lazarus" (which is, in fact, installed). And end up involved in this mess: https://forum.lazarus.freepascal.org/index.php?topic=38728.0, to which no one seems to have been able to provide a really working solution.

At this moment, I cannot any more use Lazarus under Linux!  >:(

Any hints and suggestions would be welcome.
Title: Re: Using dbexport
Post by: af0815 on September 14, 2021, 03:49:53 pm
At this moment, I cannot any more use Lazarus under Linux!  >:(

Any hints and suggestions would be welcome.
You cannot use Lazarus build from the Distro Packages. This is the Problem.

I never use any package for fpc and lazarus from the distro for a long time, because i have always trouble with this packages and crosscompiling.

My personal suggestion is
  Plan A : use fpcupdeluxe (my absolute favorite)
  Plan B : use the packages comming from the fpc team and lazarus from git and selfcompiled

Plan A works for me on Ubuntu, Debian and Raspbian for years. I never tested Plan B :-)
Title: Re: Using dbexport
Post by: maurobio on September 14, 2021, 04:13:18 pm
@af0815,

I cannot agree, because I have used that installation, from the Linux Mint repository, for more than an year! I used to be able to install components and rebuild the IDE without any hassles. My current problems appeared when I attempted to install the lazdbexport component package which is shipped with Lazarus.

I have never heard of 'fpcupdeluxe' and do not want to install anything from git which will require compilation from scratch (which, in my personal experience in accordance with Murphy's Law, will only create more poblems!)

Regards,
Title: Re: Using dbexport
Post by: af0815 on September 14, 2021, 07:01:19 pm
You have asked for a suggestion  ;D

I use fpc and Lazarus for my every day work for years, with fpcup and fpcupdeluxe.

So use your packages comming from the distros. Use it 'as is' and dont complain if somethings goes wrong. The packages from the distros and the real world for fpc/lazarus are not always compatible.
Title: Re: Using dbexport
Post by: maurobio on September 14, 2021, 08:01:39 pm
@af0815,

Quote
I use fpc and Lazarus for my every day work for years, with fpcup and fpcupdeluxe.

Good for you. Of what I have seen of the "deluxe" thing, it just adds yet another layer of complication on what should be simple and easy (like installing FPC/Lazarus and packages under MS-Windows).

I have myself used FPC/Lazarus for years too, under both Windows and Linux, without any hassles up to now.

Quote
So use your packages comming from the distros. Use it 'as is' and dont complain if somethings goes wrong. The packages from the distros and the real world for fpc/lazarus are not always compatible.

I am not "complaining", I am reporting a problem in the hope of some polite person come up with a simple working solution which does not involve imposing a favorite toy over me.

If the distribution packages which comes with Linuxes are so "useless", why are they there anyway? Well, I prefer to strick to them, thank you!
Title: Re: Using dbexport
Post by: maurobio on September 15, 2021, 11:33:48 pm
Dear ALL,

Installation of FPC/Lazarus in Linux should be as easy as it is in Windows. And that is where Debian packages come to the rescue of (Debian-based) Linux users.

So, I have finally solved the problem, in the most simple and direct way: as suggested by user @del here (https://forum.lazarus.freepascal.org/index.php/topic,38728.0.html (https://forum.lazarus.freepascal.org/index.php/topic,38728.0.html)) I downloaded the Debian packages of a more recent version of FPC/Lazarus from the official SourceForge repository and installed them directly. Now the previous prpblem with 'missing packages' disappeared and I can install any component without any further problems.

It turned out that the whole problem was the version of FPC/Lazarus (1.8.2) available in the repository of my Linux Mint distribution and not (necessarily) the distro repository itself. It remains a mystery why it has worked well until I attempted to install the dbexport package, but this is immaterial now.

I suppose I owe an apology to user @af0815, and here it is. Sorry, man. (But I still have myself no need to user more than the Windows and the Linux Debian installation packages for getting FPC/Lazarus up and running).

With best wishes
Title: Re: Using dbexport
Post by: Soner on September 16, 2021, 12:01:28 am
Sometimes I am getting trouble to build IDE from inside of the IDE then i change to Terminal/Console and type:
>make clean
>make bigide

it helps,the problems are solved but your components and not included. Now you must build it from inside of the IDE again.

https://wiki.lazarus.freepascal.org/Getting_Lazarus (https://wiki.lazarus.freepascal.org/Getting_Lazarus)
TinyPortal © 2005-2018