Daniel Magin’s Weblog

My life in the Developers World

Help Update 3 is published

CodeGear have published the Help Update 3. You can download the Help Update with Check for Update function from your RadStudio/Delphi and dircet over the dowload page from CodeGear LINK.

Daniel Magin

Advertisements

April 29, 2008 Posted by | Embarcadero (CodeGear) stuff | Leave a comment

How to create a two phase commit with Delphi and InterBase

This week i was given a 2h webinar over Understanding Transactions with InterBase and Delphi ( a playback you can find here LINK ).

One open Question was how to create a two phase commit with IBX in Delphi.

Follow these steps and you have created your first two phase commit application:

  1. Create a new Delphi Project
  2. Place for (minimum) 2 InterBases Databases a TIBDataBase Component
  3. Edit the connection String from the TIBDataBase Components to connect diffrent databases
    – for example
    – database1 ->127.0.0.1:c:\data\employee_1.ib
    – database2 ->127.0.0.1:c:\data\employee_2.ib
  4. Place 5 Buttons with following Captions
    – add database
    – start transaction
    – run queries
    – commit transaction
    – rollback tranaction
  5. Add ONE TIBTransaction component
  6. Place two TIBQuery Components (you can use later also TIBDataSet for showing data in a gird or what ever)
  7. edit the SQL Property of each TIBQueryComponent
    – update table1 set Field1=’Ernie’ where ID=1
    – update table2 set Field1=’Bert’ where ID2
    table1 is in this example a table in DataBase1 and
    table2 is in this example a table in DataBase2
  8. set of IBQuery1 properties:
    – DataBase -> IBDataBase1
    – Transaction -> IBTransaction1
  9. set of IBQuery2 properties:
    – DataBase -> IBDataBase2
    – Transaction -> IBTransaction1
  10. insert this code in the button with the caption “Add DataBase”
     IBTransaction1.AddDatabase(IBDatabase1);
     IBTransaction1.AddDatabase(IBDatabase2);
  11. insert this code in the button with the caption “start transaction”
     IBTransaction1.StartTransaction;
  12. insert this code in the button with the caption “run queries”
    IBQuery1.ExecSQL;
    IBQuery2.ExecSQL;
  13. insert this code in the button with the caption “commit transaction”
    IBTransaction1.Commit;
  14. insert this code in the button with the caption “rollback transaction”
    IBTransaction1.Rollback;
  15. in the form event on create open both databases and also on close do not forget to close the databses
  16. Compile
  17. Run and have fun

end;

 

that’s all folks

 

regards daniel

April 25, 2008 Posted by | Embarcadero (CodeGear) stuff | 1 Comment

Understanding InterBase Transactions

Join a free Webinar “Understanding InterBase Transactions”

In this session you learn the Transaction Handling with InterBase. Also some live demos with Delphi (you can use all techniques in other languages also) how to work in a perfect was between Client Applications and InterBase Server without having deadlocks, performance Problems, …

You can find more informations at: http://borland.interwise.com/borland/iClass/LE8726/

April 22, 2008 Posted by | Embarcadero (CodeGear) stuff, movies | Leave a comment

German Delphi Days 2008 announced

Delphi Days

The German Delphi Days 2008 are announced. Many speakers (incl. me 🙂 ) are talking over the new stuff around the delphi world.

More informations at this link:

http://www.delphi-tage.de/veranstaltung/agenda.html

 

April 22, 2008 Posted by | Embarcadero (CodeGear) stuff | Leave a comment

Writing UDF for InterBase with Delphi

Tomorrow Monday the 21. April 2008 i give a free webcast for codegear with the topic:

Feel free to join: http://borland.interwise.com/borland/iClass/QU8871/

10:00 (GMT)
11:00 (CET)

Writing UDF for InterBase with Delphi
Learn how to write InterBase User Defined Functions. You can expand your InterBase Server with new functions. This live demo show you the basics and a example to work with GIS Geo GPS Data like „select distance(„NewYork“) from tbl_cities“

regards

daniel

April 20, 2008 Posted by | Embarcadero (CodeGear) stuff, movies | Leave a comment

Daniel Magin: A huge thank you to Bruno Fierens and TMS Software!

I use TMS Components many times in Delphi Projects. Also as a big European Distributor for CodeGear Products many developers order TMS Components for easy development to produce rich Applications in GUI and Businesslogic. A big benefit for our customers and me is the great support for many years of the controls and also enhancing the components for the different Delphi Versions. TMS and Bruno is also for me number one choice for VCL and VCL.net components, cause Bruno and his team is absolute one of the uninterrupted components creator for the VCL for many years! We also have done roadshows with Bruno and also included his man power in customer projects to enhance his components with our wishes.
For me and many customers is the combination between functionality, support and continuous upgrades for Delphi one of the important points.

Due to recent blog postings about TMS Software and their Ribbon Toolbar Component set I do feel the need to state a few things about a fellow CodeGear Technology Partner.
Most members of the community have been doing business with TMS Software for over 10 years and the experience has been nothing like one could guess from the already mentioned postings. I would like to post about these experiences that I had. Maybe those descriptions will erase the other blog posts from your mind – as the internet is relentless and all “information” will stay for a long time to come as it seems and it is really bad for somebody to get a bad review and no word from the happy customers.

 

Thank you Bruno!

Daniel Magin
CTO better office
http://www.better-office.com

April 11, 2008 Posted by | Embarcadero (CodeGear) stuff | Leave a comment