Board index » delphi » How do I close design time connections at runtime

How do I close design time connections at runtime

When I'm designing an application I naturally use Active=True on
Tdatabase, TTable and TQueryComponents.  IF I forget to turn this off
before I distribute the app and the clients database is not in the
same location as my design time db then I get "Database not found"
exceptions as the app tried to open the design time connections.

How can I solve this problems?

Thank in advance.

 

Re:How do I close design time connections at runtime


I guess one way would be to loop through all of your TDatabase objects and
explicate set Active := False and then Active := True when necessary.  You
would do this in the Create of the first form.

Anthony Laudani
The Lane Construction Corporation
Meriden,  Connecticut

Quote
Garth Tissington wrote in message <3488eb70.178645...@forums.borland.com>...
>When I'm designing an application I naturally use Active=True on
>Tdatabase, TTable and TQueryComponents.  IF I forget to turn this off
>before I distribute the app and the clients database is not in the
>same location as my design time db then I get "Database not found"
>exceptions as the app tried to open the design time connections.

>How can I solve this problems?

>Thank in advance.

Other Threads