DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Mike C. Guest

    Disconnected Recordset


    I have two methods in com+ that I am calling from asp

    When I call method 1 and execute the following I get no complaints:
    Set rsResult.ActiveConnection = Nothing
    This one is a simple query.

    When I execute the method 2 which utilizes a command object to populate
    the recordset I get an error when I disconnect:

    ADODB.Recordset<br>[CSqlSrv] SQLStoredProc [on DEVMFG Version 1.0.0] error
    '800a0e79'

    Operation is not allowed when the object is open.

    The only other difference I see is that the latter method
    configures its own recordset:

    With rsResult
    .CursorLocation = adUseClient
    .CursorType = adOpenForwardOnly
    .LockType = adLockBatchOptimistic
    End With

    Would anyone know what might be happening?

    Thanks.




  2. #2
    Tommy Guest

    Re: Disconnected Recordset


    "Mike C." <mcoward@lortobco.com> wrote:
    >
    >I have two methods in com+ that I am calling from asp
    >
    >When I call method 1 and execute the following I get no complaints:
    >Set rsResult.ActiveConnection = Nothing
    >This one is a simple query.
    >
    >When I execute the method 2 which utilizes a command object to populate
    >the recordset I get an error when I disconnect:
    >
    >ADODB.Recordset<br>[CSqlSrv] SQLStoredProc [on DEVMFG Version 1.0.0] error
    >'800a0e79'
    >
    >Operation is not allowed when the object is open.
    >



    >The only other difference I see is that the latter method
    >configures its own recordset:
    >
    >With rsResult
    > .CursorLocation = adUseClient
    > .CursorType = adOpenForwardOnly
    > .LockType = adLockBatchOptimistic
    >End With
    >
    >Would anyone know what might be happening?
    >
    >Thanks.
    >
    >
    >




    Use the connection.Execute(strSQL) method instead of the command.Execute(strSQL)
    method.

  3. #3
    jy Guest

    Re: Disconnected Recordset


    "Tommy" <towings@smyrnacable.net> wrote:
    >
    >"Mike C." <mcoward@lortobco.com> wrote:
    >>
    >>I have two methods in com+ that I am calling from asp
    >>
    >>When I call method 1 and execute the following I get no complaints:
    >>Set rsResult.ActiveConnection = Nothing
    >>This one is a simple query.
    >>
    >>When I execute the method 2 which utilizes a command object to populate
    >>the recordset I get an error when I disconnect:
    >>
    >>ADODB.Recordset<br>[CSqlSrv] SQLStoredProc [on DEVMFG Version 1.0.0] error
    >>'800a0e79'
    >>
    >>Operation is not allowed when the object is open.
    >>

    >
    >
    >>The only other difference I see is that the latter method
    >>configures its own recordset:
    >>
    >>With rsResult
    >> .CursorLocation = adUseClient
    >> .CursorType = adOpenForwardOnly
    >> .LockType = adLockBatchOptimistic
    >>End With
    >>
    >>Would anyone know what might be happening?
    >>
    >>Thanks.
    >>
    >>
    >>

    >
    >
    >
    >Use the connection.Execute(strSQL) method instead of the command.Execute(strSQL)
    >method.


    or create the recordset object, set the appropriate properties for disconnected,
    & pass the command object to the recordset's open method as the source.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links