Category Archives: Code Hacks

Unit for fast preparing and executing SQL scripts

GAF writes “Design time application development is good for small or middle projects. But when count of forms in the project is more than 10 and number of queries on each form is more than 3 it’s too hard to … Continue reading

Posted in Code Hacks | Leave a comment

How to create a database, tables and triguers

OCTweak writes “Create a new application and add a ZConnection and a ZSQLPROCESSOR to the formAdd a button, name it CreateBtn and add the following click event for it procedure TForm1.CreateBtnClick(Sender: TObject);varHstName, PathName, DBName, Props: string;beginHstName := ‘192.168.0.1’; // if … Continue reading

Posted in Code Hacks | Leave a comment

How to define transaction isolation level during connection

OCTweak writes “procedure TForm1.ConnectBtnClick(Sender: TObject);beginZConnection.Properties.Clear;ZConnection.HostName := ‘192.168.0.1’; // ip where Firebird is installed or leave blank if embed;ZConnection.Database := ‘c:fibdatabasesTEST.FDB’;ZConnection.User := ‘sysdba’;ZConnection.Password := ‘masterkey’;ZConnection.Properties.Add(‘codepage=ISO8859_1’);ZConnection.TransactIsolationLevel := tiNone; // use ZDbcIntfs// ==============================// IMPORTANT//The first element in every TPB must be the isc_tpb_version3 … Continue reading

Posted in Code Hacks | Leave a comment

Suggestion: remove drivers from ZConnection.pas and move to other unit

ssamayoa writes “A few days ago I began to test Zeos because I like the idea to make single applications which targets diferent dabatase servers, in my case Im interested on supporting Firebird, Oracle and MS SQL Server. What I … Continue reading

Posted in Code Hacks | Leave a comment

ZConnection. AllowStreamed Connected property

samayoa writes “I have found that such property of IBX’s IBDatabase is very useful. I often have some code at main form’s FormCreate event which gets (via user intervention, INI reading, registry reading, etc.) to which database user want to connect. Without … Continue reading

Posted in Code Hacks | Leave a comment