jose_pita
12 years agoSuper Contributor
Get feedback from ConnDB.Execute
Hi There,
Does anyone know how can I obtain feedback from an executed SqlQuery?
For example, I want to do an update on a DB Table and I want to know how many rows were affected, is this possible?
Here is the code I use:
function sqlQueryExecute(server, query)
{
var ConnectionString = "DRIVER=SQL Server;SERVER="+ server +";UID=****;PWD=****";
// Creates a new connection
var ConnDB = ADO.CreateConnection();
ConnDB.ConnectionString = ConnectionString;
ConnDB.Open();
ConnDB.Execute(query);
Log.Message("QUERY EXECUTED")
// Closes the connection
ConnDB.Close();
}
Does anyone know how can I obtain feedback from an executed SqlQuery?
For example, I want to do an update on a DB Table and I want to know how many rows were affected, is this possible?
Here is the code I use:
function sqlQueryExecute(server, query)
{
var ConnectionString = "DRIVER=SQL Server;SERVER="+ server +";UID=****;PWD=****";
// Creates a new connection
var ConnDB = ADO.CreateConnection();
ConnDB.ConnectionString = ConnectionString;
ConnDB.Open();
ConnDB.Execute(query);
Log.Message("QUERY EXECUTED")
// Closes the connection
ConnDB.Close();
}