RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSQLConnection.AutoClone Property

Specifies whether the SQL connection automatically clones database connections when they are needed.

Pascal
property AutoClone: Boolean;
C++
__property Boolean AutoClone;

AutoClone controls whether the TSQLConnection component automatically creates duplicate database connections when the number of statements allowed by the database server is exceeded. By default, AutoClone is true, meaning that when the ActiveStatements property is the same as MaxStmtsPerConn, trying to execute another statement (open another dataset or call the Execute method) causes TSQLConnection to open a secondary (cloned) connection. The result behaves just like a connection to a server that does not limit the number of statements, except that it consumes more resources (for the additional, cloned connections). 

Change AutoClone to false to prevent TSQLConnection from cloning the database connection when the application attempts to exceed the maximum number of statements. When AutoClone is false, attempts to exceed MaxStmtsPerConn result in an exception.

Tip: When AutoClone is false, you can check the ActiveStatements property to ensure that you do not exceed the server-imposed limit on the number of statements. If you are about to exceed that limit, you can explicitly call CloneConnection to clone the connection yourself.
 

 

MaxStmtsPerConn 

ActiveStatements 

CloneConnection 

Connecting to the Database Server

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