Forum Moderators: open
This is not math related whatsoever.
When I need to make several updates/inserts to a database I am putting each command into an array which then loops through and executes the commands under the control of a transaction using an ADODB.Connection object.
The problem is that sometimes, randomly, an Overflow error will occur. When I investigate the problematic sql command it will run no problem whatsoever. When I try to run the series of commands again they will execute without problem.
The database fields are of adequate size to accept the values being put into them.
I am using SQL Server 2000 backend with IIS 6/vbscript.
What other things can cause a vbscript runtime Overflow error? Anything related to the ADODB.Connection object? or perhaps arrays?
are you opening the connection yourself in code?
"... if you do open the connection in code, you must close it while it's still in context or the connection pool will overflow ..." - taken from [msdn.microsoft.com ]
HTH,
Mark
con.open "connection_driver_info"
if Ubound(command_array) > -1 then
con.BeginTrans()
for x=lbound(command_array) to ubound(command_array)
con.Execute(command_array(x))
next
con.CommitTrans()
end if
con.close
set con = nothing
please keep in mind this is simplified to include only the pertinent info. Lets just assume valid sql is in the command_array, and ignore any rollback code for transactions.