Melbourne Meeting – July 2015

Monday 20th July

Improved SQL Communications with a TADOConnection Descendant – Jason Tolley

Jason discussed Improved SQL communications using a TADOConnection descendant.

It Provides::

  • Support for informational and debug messages from stored procedures to your Delphi application.
  •  Support for debugging information.
  •  Support for long stored procedures with no timeouts.

Jason showed us how TADOConnection can be used to monitor the progress of an SQL stored procedure or query. This technique can be used for updating a progress bar, for debugging a stored procedure or for returning logging and error messages.

To get this functionality, it was necessary to run the stored procedure or query from the connection component, rather than using TADOStoredProc or TADOQuery. He used the TADOConnection.Execute method and processed the messages returned by the OnInfoMessage event.

He also discussed the advantages and disadvantages of stored procedures. Performance was the biggest advantage of stored procedures. Disadvantages included vendor lock-in, limitations of the SQL language, increased difficulty of debugging and issues about having the business logic spread between Delphi and SQL. A good discussion  resulted, with lots of questions and comments.

A link to Jason’s sample code including his  TADOConnection decendant will appear here sometime.

 

 

Posted in Meetings, Melbourne