RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDatabase.ValidateName Method

Raises an exception if a specified database is already open in the active session.

Pascal
procedure ValidateName(const Name: string);
C++
__fastcall ValidateName(const AnsiString Name);

Call ValidateName to prevent duplicate access to a database from within a single session. Name is a string containing the name of the database to test. If the database is already open, ValidateName raises the EDatabaseError exception. If the database is not open, the procedure returns, and the application continues processing.

Note: Most applications should not need to call this method directly. It is called automatically each time a database is opened.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!