[Lazarus] Handy script for Firebird users

Joost van der Sluis joost at cnoc.nl
Wed Apr 30 20:59:06 CEST 2008


Op woensdag 30-04-2008 om 13:13 uur [tijdzone +0200], schreef Graeme
Geldenhuys:
> Joost van der Sluis wrote:
> > And you didn't write it in Pascal because.... ?
> > 
> > Joost
> 
> Because the deployment PC's will not have FPC on them.
> Ummm... Then again, it takes all the parameters it needs for 
> customization. Also, if I make it a console app, it will be 
> cross-platform to. :)
> 
> How to you handle standard input like was done in the script?

I would simply use TSQLConnection.CreateDB to create a database, and the
TSQLScript component to execute the scripts...

> ------------copy-------------
> echo -n "Creating the database $database ..."
> ${ISQL} << EOF
> set sql dialect 3;
> CREATE DATABASE "$database";
> commit;
> EOF
> if [ ! $? = 0 ]; then
>    echo "Failed."
> else
>    echo "Done."
> fi
> ------------end-------------
> 
> 
> Regards,
>    - Graeme -
> 
> 
> _______________________________________________________
> fpGUI - a cross-platform GUI toolkit using Free Pascal
> http://opensoft.homeip.net/fpgui/
> 
> 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> 
-- 




More information about the Lazarus mailing list