1. Computing & Technology

Discuss in my forum

in Delphi Database Development :: No matter how much I (guess this refers to all of you) try not to leave the Connected property to true before building for the last time - in most cases I simply forget to close the connection before saving and closing the project.

Read the full article to learn about An Error at Run-Time due to the Database Connection Left Open at Design-Time.

Related:

Comments
March 11, 2010 at 7:38 am
(1) Mason Wheeler :

Interesting. Though you still have to remember to do that everywhere.

If I wanted to solve this, I’d just edit the ADO component (or create a subclass if I couldn’t edit it) and set stored to false on the Connected property. Problem solved, immediately, for everywhere you use it.

March 12, 2010 at 8:24 am
(2) Louis Kleiman :

You can also use GExperts to help solve this. My copy is configured to close all DataSets and database connections before every compile.

March 14, 2010 at 6:50 pm
(3) Jim :

As one of the programs I develop could be connected to different databases depending on where it runs, I just hook into the BeforeConnect event and assign the required ConnectionString there.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2012 About.com. All rights reserved.

A part of The New York Times Company.