Rick Lipkin wrote:Jeorge
Try the old fashoned way where you set the Recordset properties manually ...
- Code: Select all Expand view RUN
oRs1 := TOleAuto():New( "ADODB.Recordset" )
oRs1:CursorType := 1 // opendkeyset
oRs1:CursorLocation := 3 // local cache
oRs1:LockType := 3 // lockoportunistic
TRY
oRs1:Open(cSQL,oCn )
CATCH oErr
MsgInfo( "Error in Opening CLIENTS table" )
RETURN(.F.)
END TRY
Rick Lipkin
This is what FW_OpenRecordSet( oCn, cSql ) function does.
What is the extra thing you are doing to speed up the query?
Another important information to all of u:
Whatever value we specify for oRs:CursorType, ADO invariably opens the recordset as adOpenStatic only for CursorLocation adUseClient.
There is not point in assigning a value like adOpenKeySet or adOpenDynamic