CommandTimeout does not work [message #100983] |
Thu, 11 March 2004 03:11 |
Ammara Khan
Messages: 1 Registered: March 2004
|
Junior Member |
|
|
We are having the issue getting the Commandtimout to work for a ADO command. We have long running queries and want to stop the query if it takes more then x secs.
Here is the code snippet I have:
strConn = "Data Source=" + datbasehere + ";User Id=" + userIDhere + ";Password=" + passwordhere + ";"
strConn = strConn + "Provider=oraoledb.oracle";
var strConnection = Server.CreateObject("ADODB.Connection");
strConnection.Open(strConn);
var strCommand = Server.CreateObject("ADODB.Command");
strCommand.ActiveConnection = strConnection;
sql_str = sql_str.replace(/'/g, "'");
strCommand.CommandText = sql_str;
strCommand.CommandTimeout= 10;
var rsQuery = Server.CreateObject("ADODB.Recordset");
rsQuery = strCommand.execute();
Has anyone seen a similar issue?
|
|
|
|