[Lazarus] Using Classes Generated by Lazarus Database Desktop

Jack Linke jacklinke at gmail.com
Mon Jun 23 16:14:37 CEST 2014


I'm building the second iteration of a desktop application which uses
SQLite3, and rather than hard-coding SQL Queries as I did in the
initial version, I'd like to use Object-oriented techniques to keep
things flexible and extensible. I thought LazDataDesktop would be
excellent for this purpose.

But I don't know what to do with the darned thing. It's probably
something simple I'm missing, but nonetheless, I am missing it and
can't move forward.

I've read through every scap of documentation, forum posts, etc that I
could find on the Lazarus Data Desktop, and even the Borland/Delphi
and JEDI data desktops, but I have found nothing that helps me
understand the concepts for using the code that is generated. I've
tried every variation of search terms I could think of. I looked for
info on the lazarus documentation site, the lazarus wiki, and the
lazarus forums. I even posted a question to the forums, but nobody
seems to have a clue how to make use of the database desktop's output
code.

I'm still pretty new to OO and it I've only been programming in pascal
for about a month after a hiatus of several years, so I'm really
struggling.

The LazDataDesktop Readme says the output can:
    Create a Class with properties corresponding to the fields in your query.
    Additionally, create a list corresponding with this class and code
to load it.

But it doesn't have an example of *how* this is actually done.

Is there any tutorial or documentation anywhere for how to actually
use LazDataDesktop and the code that it generates? How do I use the
classes that are generated within my application? Can any of you
provide a sample of code that might get me started? Anything at all?
I'm at my wit's end.

About to give up and just go ahead and hard-code everything. You
brilliant guys and gals are my last hope.

Any assistance or clues you can provide will be very much appreciated.

Thanks much,

- Jack

If I can get this figured out, I'll be adding the relevant info to the
wiki so others can use the data desktop effectively.




More information about the Lazarus mailing list