Re: Command.Execute hangs forever

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Rob MacFadyen wrote:
Hey all,

I've got a very odd case. I have a command object that occasionally
will "hang" forever.

Roughly speaking the code looks like:

dim cmd as ADODB.Command
cmd.CommandText = "blah blah"
set cmd.ActiveConnection = cn
cmd.Parameters.Append ... half dozen parameters ...
cmd.Execute ' <--- never ever completes or error's out

What is really odd about this is the doing a SQL trace/profile on the
database server does not show the command being sent to the server.
It is also odd that the particular bit of code is well used on a
daily basis by lots installations, and even many times by the
installation where the problem is occurring.

The windows event log (application, system, security) do not have any
applicable entries, the SQL Server error log is clean.

Is there any setting I can enable to get any sort of debug
information out of ADODB?

Any suggestions on stuff I should be looking at (I ran component
checker on the server and it's fine... mdac 2.8 sp2 on windows server
2003 sp2)?

If you have On Error Resume Next in your code, comment it out so errors
are not masked.
--
HTH,
Bob Barrows


.



Relevant Pages

  • Command.Execute hangs forever
    ... I've got a very odd case. ... I have a command object that occasionally will ... database server does not show the command being sent to the server. ... The windows event log do not have any ...
    (microsoft.public.data.ado)
  • Re: Duplicate Record with .ADDNEW
    ... If the database server will allow you to create a table without something, ... table there is no possibility of duplicate records. ... field imported from the XML. ... Use the Command object instead. ...
    (microsoft.public.vb.database.ado)
  • Re: Windows 2000 Server hangs but can still ping.
    ... >>> The event logs show absolutely nothing which is very odd to me. ... It was a paging error on the hard drive. ... > hard drive was going bad or having to turn the server off the past few ...
    (microsoft.public.win2000.general)
  • Re: cant send some emails - Sending reported error (0x800CCC6F)
    ... Just to clarify the problem - it sends some emails and then the odd one it ... that your Port Server for Incoming and Outgoing are correct. ... test email will not go to the Outbox. ... > Sometimes it simply wont send the odd email, ...
    (microsoft.public.outlook)
  • Re: Error: Executing Stored Procedures-- Cannot Pass TimeStamp Values From sqlCommand Object Parame
    ... How is the Command object being constructed? ... Set record supdate with a SQL Server 2000 DB. ... procedure that accepts as one of its paraeters a timestamp parameter to ... I am using Visual Basic.Net with Visual Studio 2003 and .Net Framework ...
    (microsoft.public.dotnet.framework.adonet)