-
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.
-
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.
-
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks