Hi all,
I've seen this error posted in this forum before last year by someone
else, but it didn't get a response... So I wrote it in the forum again,
the error is:
Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
failed
The code works fine if I don't do much inserts on the DB (no more that
2000) but after that the process just stops and shows this error. Heres
the code snipplet where I do the insertion:
Sub writeEmailToDB (myEmail)
Set objDBConn = Server.CreateObject("ADODB.Connection")
objDBConn.ConnectionTimeout = 500
objDBConn.CommandTimeout = 500
objDBConn.Open "uid=whatever;pwd=whatever;dsn=whatever"
mySQL = "SELECT * FROM tUndeliveredEmail WHERE email ='" & myEmail
& "'"
objRST.Open mySql, objDBConn, 3, 3
If objRST.eof Then
SQL = "INSERT into tUndeliveredEmail (campaign, email)
values('" & session("campaign") & "' , '" & trim(session("email")) & "')"
objDBConn.Execute(SQL)
End If
objRST.Close
End Sub
I'm trying to insert about 10000 records to de DB, but what I'm having to
do at the momment is divide the chunk of info it's reading (it's getting
it from a file) into smaller pieces. Would any one know why? Thanks!
Carlos