Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordsets and ADO

Status
Not open for further replies.

gavinjb

Programmer
Apr 24, 2003
106
GB
Does anyone know if you can use the recordsetclone method with ADO, I am just moving across from DAO and when ever I try to use this with ADO, and then use a find and use the forms bookmark to point to the RSC bookmakr it fails, while in DAO this worked fine, see example code below

dim rstADO as New ADO.Recordset

set rstado = me.recordsetclone

rstado.find "UserName = '" & me!username & "'"
me.bookmark = rtado.bookmark
 
No you can use Recordsetclone with ADO. When using an ADO recordset you open the recordset as follows:

recordset.Open Source, ActiveConnection, CursorType, LockType, Options

instead of the old DAO way of:

Set recordset = Currentdb.OpenRecordset(strSQL)

Hope this helps,
Shane
 
No you can't use Recordsetclone with ADO. When using an ADO recordset you open the recordset as follows:

recordset.Open Source, ActiveConnection, CursorType, LockType, Options

instead of the old DAO way of:

Set recordset = Currentdb.OpenRecordset(strSQL)

Hope this helps,
Shane
 
thanks,

it would have been nice had MS added support for this function with ADO, as it is very usefull at times.
 
following on from my query yesterday, does anyone know how to goto a particular record in a form using ADO, I have tried the code below, but when I run it it fails with the folling message "3051 current recordset does not support recordsets". does anyone have a solution to this.

Dim rs As New ADODB.Recordset

rs.Open Me.RecordSource, CurrentProject.Connection, adOpenDynamic, adLockOptimistic

rs.Find "[Name] = '" & Me![cboFind] & "'"
Me.Bookmark = rs.Bookmark


Gavin,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top