Re: Timeout Expired for no apparent reason

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Sami Samir (SamiSamir_at_discussions.microsoft.com)
Date: 08/06/04


Date: Fri, 6 Aug 2004 00:57:01 -0700


I checked for locks during the execution. I did not define any transactions
in my code. Maybe it's defined explicitly?
The reason why I'm doing it in a DLL is that when I do it in a stored
procedure, it causes other commands to be blocked. This was an attempt to
avoid this by doing updates one at a time.

Thanks,
Sami Samir

"Andrew J. Kelly" wrote:

> Did you check for locks during the execution of the update or after? Are
> all of these updates wrapped in a single transaction? It sounds likely that
> you were blocked for a short enough period of time to cause the timeout. By
> default I believe it is only 30 seconds. What is the reason for doing this
> in a DLL though? Why not just use a stored procedure?
>
> --
> Andrew J. Kelly SQL MVP
>
>
> "Sami Samir" <SamiSamir@discussions.microsoft.com> wrote in message
> news:4BE61091-F2FD-48AC-AF20-3E646A58E50F@microsoft.com...
> > I have a VB 6 Active X DLL that contains a method that opens a recordset
> and
> > for each row updates a row in another table and then updates the original
> > table. The database is a SQL Server 2000 cluster (SP3). My problem is that
> > when I run this method from an ActiveX script from within a DTS package, I
> > notice that everything is fine and hundreds of rows are updated per minute
> > and then after a certain random ammount of time and rows it gives me this
> > error:
> >
> > [Microsoft][ODBC SQL Server Driver]Timeout expired
> >
> > Each update takes less than a second and should not be the reason for this
> > error. Also, I checked if there were any locks on the table, but there
> > weren't. I use an ODBC connection to connect to the database using MDAC
> 2.6.
> > Has anybody experienced a similar case who can help me?
> >
> > Thanks and best regards,
> > Sami Samir
>
>
>



Relevant Pages

  • Re: Transaction and locks
    ... You should read a bit more about transactions in Books OnLine. ... All transactions use locks, even in read uncommitted level you get exclusive ... all updates are automatically transactions. ... committed snapshot, snapshot) are optimistic. ...
    (microsoft.public.sqlserver.clients)
  • Re: Observer pattern limitations
    ... subject to a reasonable definition of integrity. ... Transactions are defined at the application level - this tells ... The separation between independents / dependents is easy to understand. ... For the same reason distributed and concurrent programs ...
    (comp.object)
  • Re: Back end database lock-up
    ... Or are you programmaticlly executing some updates in an action query or some code? ... Check the open mode and locking strategy of *each* front end. ... Default Record Locking: No Locks ...
    (comp.databases.ms-access)
  • Re: A Site Devoted to John Williams
    ... I'm not going to quote any of the original messages (which, ... In a nutshell and without going on too long, though, the main reason ... Some of the speculation for the lack of updates was that I may have lost ... went through an extended period when JW was demoted to the background. ...
    (rec.music.classical.guitar)
  • Re: Leopard rant - hard shutdowns all the time
    ... won't connect in the first place and for no apparent reason (similar ... add that I haven't used the PC in about a month, and it took the best part of 20 minutes to faff about with restarts and updates. ... In the end it was because of cd writing software conflicting with a windows update. ... been leant a year old, 2000 mile Wuyang 125 motorbike, a Honda CG125 ...
    (uk.comp.sys.mac)