Difference between revisions of "lazdatadesktop"

From Free Pascal wiki
Jump to navigationJump to search
(Created datadesktop page)
 
Line 14: Line 14:
 
Basic support can be added by  
 
Basic support can be added by  
 
First adding support to FreePascal data dictionary code in <fpcsource>\packages\fcl-db\src\datadict:
 
First adding support to FreePascal data dictionary code in <fpcsource>\packages\fcl-db\src\datadict:
- creating a basic data dictionary unit. You could try copying and modifying another basic unit such as fpddmysql40.pp
+
* creating a basic data dictionary unit. You could try copying and modifying another basic unit such as fpddmysql40.pp
- edit buildd.lpr to add the unit you created above.
+
* edit buildd.lpr to add the unit you created above.
- edit Makefile.fpc to add the unit to the packages_<OS>=* lines in the [required] section, and the [target] section.
+
* edit Makefile.fpc to add the unit to the packages_<OS>=* lines in the [required] section, and the [target] section.
 
Recompile FPC to get support into Lazarus.
 
Recompile FPC to get support into Lazarus.
  
 
Then add support to the data dictionary:
 
Then add support to the data dictionary:
- adding the data dictionary unit (e.g. fpddmysql51) to the implementation uses clause of frmmain.pp
+
* adding the data dictionary unit (e.g. fpddmysql51) to the implementation uses clause of frmmain.pp
 
Recompile lazdatadesktop
 
Recompile lazdatadesktop
  

Revision as of 08:46, 18 July 2013

Purpose

Lazdatadesktop is a database tool that can be used with Lazarus or standalone. It lets you manage data dictionaries, browse them etc.

Getting it

Lazdatadesktop is a Lazarus project in the <lazarusdir>\tools\lazdatadesktop directory. Simply compile it like you would any other Lazarus project.

You can add it to the Lazarus tools menu if you want to.

Extending LazDataDesktop

You can add additional database drivers to Lazdatadesktop. We're assuming you're adding support for sqldb database drivers. You will need to perform additional work if adding e.g. ZEOS drivers.

Basic support

Basic support can be added by First adding support to FreePascal data dictionary code in <fpcsource>\packages\fcl-db\src\datadict:

  • creating a basic data dictionary unit. You could try copying and modifying another basic unit such as fpddmysql40.pp
  • edit buildd.lpr to add the unit you created above.
  • edit Makefile.fpc to add the unit to the packages_<OS>=* lines in the [required] section, and the [target] section.

Recompile FPC to get support into Lazarus.

Then add support to the data dictionary:

  • adding the data dictionary unit (e.g. fpddmysql51) to the implementation uses clause of frmmain.pp

Recompile lazdatadesktop

Full support

For full support, you will need to edit the fpdd<database>.pp unit.

An alternative approach would be to rewrite the fpddd* units to use database schema data from the underlying drivers (e.g. the sqldb drivers).