[fpc-pascal]Common database access in Pascal

Fernando Lozano fsl at centroin.com.br
Sat Jul 27 06:12:22 CEST 2002


Hi Michael,

>>Well, having a unified DB API like Perl DBI, PHP PEAR, Java JDBC and
>>others saves much development time. It's not nice to change lots of
>>lines of code just to move from one database to another.
>>    
>>
>Depending on how you would work, you'd normally have only one or two lines
>of code to change:
>
>Something like
>
>DB:=TMYSQLDatabase.Create(Nil);
>DS:=TMySQLDataset.Create(Nil);
>
>Would become
>
>DB:=TIBDatabase.Create(Nil);
>DS:=TIBDataset.Create(Nil);
>
>All the rest would remain 100% the same...
>
Could please send a complete example on this? The test and sample 
programs on the FCL provided by FPC 1.0.6 don't show this. I Could not 
figure, for example, how a Database and a Dataset would interact (I do 
not want each Dataset to have it's own connection to the database server).

By the way, have you seen my message about a possible memmory allocation 
bug on the DB classes from the FCL?


[]s, Fernando Lozano

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freepascal.org/lists/fpc-pascal/attachments/20020727/42c86bf7/attachment.htm


More information about the fpc-pascal mailing list