Link to home
Start Free TrialLog in
Avatar of KateXS
KateXS

asked on

converting From DAO to ADO - need help

I have code that works in DAO - I need to convert the whole project to ADO

I have a convertion table at http://www.databasejournal.com/features/mssql/article.php/1490571
I am working from but I am still stuck after   'setting the recordset
Can anyone advise me? I have tried
**************************************************************************************
Dim gr As GridEX
''Dim Rs As Recordset
Dim Rs As New ADODB.Recordset
    Me.grDropDown.Visible = False 'to be sure the control is hidden
    Set gr = Me.grDropDown.Object
    'setting Bound and Replace columns
    gr.ReplaceColumnIndex = "Status"
    gr.BoundColumnIndex = "StatusID"
   

  Dim strSQL As String
    strSQL = "StatusQry"

    Rs.CursorLocation = adUseClient
    Rs.Open strSQL, CurrentProject.Connection, adOpenStatic, adLockReadOnly
  '' Rs.Open ("StatusQry")
  ''  Set Rs = CurrentDB.openRecordset("StatusQry")
    'setting the recordset
    gr.HoldFields
Set gr.Recordset = Rs
   
    Set gr = Me.GridEX1.Object
    gr.Columns("Status").EditType = jgexEditCombo
    Set gr.Columns("Status").DropDownControl = Me.grDropDown.Object 'setting the dropdown control for the column
   
    Set gr = Me.GRIDEX2.Object
    gr.Columns("Status").EditType = jgexEditCombo
    Set gr.Columns("Status").DropDownControl = Me.grDropDown.Object
Avatar of flavo
flavo
Flag of Australia image

strSQL = "SELECT * FROM StatusQry"

Dave
Avatar of KateXS
KateXS

ASKER

yes of course Dave - but
what to do at line
Set gr.Recordset = Rs

and beyond - that is where I am stuck
ASKER CERTIFIED SOLUTION
Avatar of flavo
flavo
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KateXS

ASKER

Gridex is Janus Gridex 2000b active x control at Janusys.com

Janus supports DAO 3.6 and DAO 2.x
We moved to mysql backend with unbound forms - running now on DAO 2.1 - Thanks
Avatar of KateXS

ASKER

I changed all code back to DAO  - thanks