Weird SQL connection error

antic

Perch
Hi guys, hope someone can help with this. Warning: It's weird.

Basically I've written a routine to go thru several thousand records in an MSSQL db and do some data conversion as part of a software upgrade.

During the process, it throws the error "SQL Server does not exist or access denied". That's weird because it bombs on a classic ADO command.execute method. Example:
Code:
' Update these fields.
cmdUpdText.Parameters("@AnswerId").Value = lNewAnsId
cmdUpdText.Parameters("@QuestionId").Value = lQuestionId
cmdUpdText.Execute ,,adExecuteNoRecords
The above code executes in a loop through various records. The command object is set before the loop of course, and only a single connection object is assign to it. After about a minute's worth of processing, it throws that error. How is that possible?

I've checked autogrowth on the SQL server, there's heaps of space. I'm running it locally - SQL 2005 EXPRESS on local machine, using OLEDB to connect.

Any ideas?
 
Yep, no errors in the logs.

Found that if I changed the provider from OLEDB to {SQL Native Client} it worked ok. Don't know what the cause was, it's a weird error. Found posts from other people with the same error but no specific resolutions.
 
Back
Top