Menu
Index

Optimizing VBScript Database Connection Speed

 
Applies from ChronoScan 1.0.0.49 onwards. 
 
We have added a new function to ChronoScan VBscritps that allows you to maintain an open database connection. This will speed up queries to external data sources.
 
The new function is:
 
ChronoApp.CreateAdoDBConnection( DSN, USERNAME, PASSWORD)
 
DSN: your connection String
USERNAME: User name for the connection, (if not supplied on the DSN)
PASSWORD: Password for the connection, (if not supplied on the DSN)
Creating a new persistent database connection replaces the old ADODB.Connection method:
 
Example:
 
Set MyDB = CreateObject("ADODB.Connection")
 
MyDB.Open "ULISES_JOSE_DEV"
 
With a call to the new function:
 
Set MyDB = ChronoApp.CreateAdoDBConnection("ULISES_JOSE_DEV", "", "")
 
 
Very Important:
 
Remember to remove all MyDB.Close calls. ChronoScan will manage the database flow to speed up calls. Avoiding this step may stop your connection.
comments powered by Disqus