Re: CursorType issue with .mdb and Excel VBA, ADO



> '//Populate Recordset via execution of ADO Command/SQL Statement -->
> Set rstRate_Defs = cmdGet_Rate_Defs .Execute

This statement _ONLY_ gets either

(i) ForwardOnly, ReadOnly recordsets if underlying Connections
CursorLocation is Server
(ii) Static, ReadOnly recordsets if underlying Connections CursorLocation is
Client

It does not matter what CursorType, LockType you set the Recordset before
hand, they are ignored.
That is true for all databases, all providers AFAIK if you do

rst = cmd.Execute()

If you want different CursorType's, LockType's for your Recordset you need
to do something different than above Execute. In particular you need to

(i) Setup your recordset properties, make sure connection is _NOT_ set
(ii) Setup your command properties, make sure connection _IS_ set
(iii) Do a Recordset Open() making sure the source property is the Cmd
object in step (ii)

Stephen Howe


.



Relevant Pages

  • Re: ADO Recordset vs Command and AD
    ... The CursorLocation can be set on the connection prior to opening the ... This CursorLocation is applied to the recordset opened on this ... Open method of a Recordset object, so you can assign the cursorType ... CommandText property of a Command object so you can turn on paging and use ...
    (microsoft.public.scripting.vbscript)
  • Re: Current Recordset does not support updating.
    ... it may be a limitation of your ... > that the recordset is editable. ... > above CursorLocation to see if problem went away, ... I changed the CursorType to adOpenKeyset. ...
    (microsoft.public.vb.database.ado)
  • Re: Return a recordset from an MDB
    ... Is it necessary to specify a CursorLocation? ... Execute method of the Command object to return a Recordset, ... If you use a Connection object, ...
    (microsoft.public.scripting.vbscript)
  • Re: VB 6.0 Crystal 8.5 ADO - Passing recordset to report problem
    ... .CursorLocation = adUseClient ... > recordset and then try and pass this recordset to a crystal report ... > source in my report using the 'Set Location' menu option. ... > Dim Report As New CRAXDRT.Report ...
    (microsoft.public.vb.crystal)
  • Re: Download Speed
    ... out, under SQL Server, is server-sided,readonly,forwardonly. ... then you have no control on the RecordSet, you should get the ... get back Forward only, Readonly, Server Sided RecordSet, CacheSize = 1. ... Connection CursorLocation is Client-sided, you should get back Static, ...
    (microsoft.public.data.ado)