Re: Handling Script Timeout when invoking ActiveX Object involving ADODB from ASP2.0 pages

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Patrick (patl_at_reply.newsgroup.msn.com)
Date: 11/12/04


Date: Fri, 12 Nov 2004 17:42:02 -0000

OK, but I still have problem with using the "Transaction" page attribute,
from a page that use ADODB to issue SQL Update statement against a remote
SQL Server within the same network

 I can only get the example working with the "Mickey mouse" MSDN Example at
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q182036

In a proper scenario, I have an ASP Page, which
1) server.createobject("adodb.connection") an ADODB.connection
2) invokes. execute(mySQL) on the ADODB.connection to get a Record Set
3) Does a CreateObject on a .NET Class Library via Interop (using the regasm
/tlb tool)
4) Invoke a method on the ActiveX object of 3

Problems
1) When the page is set to either of the following
            <%@ TRANSACTION=REQUIRES_NEW LANGUAGE="VBScript" %>
            <%@ TRANSACTION=REQUIRED LANGUAGE="VBScript" %>

2) I get error
err.number= -2147168246
err.Description= New transaction cannot enlist in the specified transaction
coordinator.
( After the page loads, resulting in the above error, the COM+ Committed
Transaction statistics increments by 1, this is on IIS5.1 on WinXP
Professional SP1)

3) The page runs without error (with the exception when the page timeout, of
course) when
3.1) The page has no transaction attributes set or
3.2) Transaction attribute is set to SUPPORTED or NOT_SUPPORTED

4) With this production ASP page, the OnTransactionAbort sub-routine is not
fired off even when the page times-out!

I have figured out that
1) It is NOT the CreateObject or call to the .NET Interop class library that
is causing this problem
2) It seems to be the ADODB that is causing the problem!
2.1) The SQL Server against which SQL are executed are on a SQLServer 2000
SP3a on a remote server within the same network running Windows Server 2003
2.2) The following are executed:
    set connTemp = createobject("adodb.connection")
    connTemp.Open connString
    set openRSexecute = conntemp.execute(updateSQL)
    if err.number <> 0 then
        %><%=err.Desription%><%
    end if



Relevant Pages

  • Re: Asynchronous Stored Procedure Never Returns - Help?
    ... If you have the Sql Server 2000 or 2005 docs they are thorough and can be ... for Transaction SQL Reference from the drop-down or select a keyword from ... your query in Query Analyzer or Sql Server Management Studio, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Viewing SQl transacion logs...
    ... is there a way to have SQL keep track of specifc changes regardless ... > whether or not the change was part of a transaction? ... The SQL Server Transaction logs keep track of *all* changes to the database, ... triggers on any table to create an audit trail. ...
    (microsoft.public.sqlserver.odbc)
  • Re: Advantages of an SQL 2005 cluster from transaction point of view
    ... Clustering will not effect the transaction count which your SQL Server ... Cluster service is designed as a high availability solution. ...
    (microsoft.public.sqlserver.clustering)
  • Re: sqltransaction timeout
    ... SQL Server places exclusive locks on all of the resources ... These locks are then held until the ... transaction either commits or rolls back. ... SQL Server does not even ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Trigger problem (losing my mind here!)
    ... What DBMS is the remote of? ... And if DTC is not available for the remote machine, you need ... between transaction manager, and DTC is supposed to support this). ... Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)