Re: For Stephen Howe on SQLOLEDB Provider Proble



Dear Stephen,

I first want to thank you for your proof answer. The code I use in C++ and
is the following :

THROW_ERR( m_piRecordSet.CoCreateInstance(CLSID_CADORecordset) );

THROW_ERR( m_piRecordSet->put_Source(varSQL) );


THROW_ERR( m_piRecordSet->putref_ActiveConnection(m_piConnection) );

THROW_ERR( m_piRecordSet->put_CursorLocation(adUseServer) );

THROW_ERR( m_piRecordSet->Open(vNull, vNull, adOpenKeyset,
adLockPessimistic, adCmdText) );

and I want to underline that using the SQL ODBC Driver I don't have any
problem, but only with the SQLOLEDB driver.

I've verified, as you suggested, what happens using the ServerSide cursor:

When I open the recordset in run-time mode (using the debug compiled
process) without Visual C++ as a normal process.
the rs.open give me back a LockType 1 (ReadOnly) ad a cursor type 0
(forwardonly)
But if I debug the same process inside DevStudio it works and it returns the
requested locktype and Cursor type...very strange!!
How can I get a recordset updatable with a serverside cursor on this
query...is there anyway?
And why the choosing of the locktype depends on the type of query we are
doing using a server side cursor, it's quite strange to me, because on other
queries this doesn't happen?
Note: the query returns more or less 50.000 records, if this can help.

Thank's a lot again.

Andrea



.