Disconnected recordset
From: Tom Nys (tom.nys_at_agfa.com)
Date: 03/16/04
- Next message: David: "Re: MDAC error?"
- Previous message: Stephen Howe: "Re: MDAC error?"
- Messages sorted by: [ date ] [ thread ]
Date: 16 Mar 2004 07:19:07 -0800
Hi,
I am using disconnected recordsets, though I notice that a serverside
cursor is used whenever retrieving recordsets through the second
connection in case I have 2 connections to SQLServer. Sample code:
_CommandPtr command;
command.CreateInstance(__uuidof(Command));
_bstr_t sqlbstr ("SELECT * FROM TABLE");
command -> PutCommandText(sqlbstr);
command -> PutActiveConnection( _variant_t((IDispatch *) connection2
));
result->CursorLocation = adUseClient;
_variant_t conn;
conn.vt = VT_ERROR;
conn.scode = DISP_E_PARAMNOTFOUND;
result->Open((_variant_t((IDispatch*)command)), conn, adOpenStatic,
adLockReadOnly, -1);
conn.vt = VT_UNKNOWN;
conn.punkVal = NULL;
result->PutActiveConnection(conn);
command->PutActiveConnection(conn);
I use MSDASQL as provider.
Anyone ever noticed this issue?
When retrieving data over the first connection, the disconnected
recordset seems to work fine. I noticed the issue by looking with SQL
Profiler.
Thanks for any tips!
Tom.
- Next message: David: "Re: MDAC error?"
- Previous message: Stephen Howe: "Re: MDAC error?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|