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("S tatusQry")
'setting the recordset
gr.HoldFields
Set gr.Recordset = Rs
Set gr = Me.GridEX1.Object
gr.Columns("Status").EditT ype = jgexEditCombo
Set gr.Columns("Status").DropD ownControl = Me.grDropDown.Object 'setting the dropdown control for the column
Set gr = Me.GRIDEX2.Object
gr.Columns("Status").EditT ype = jgexEditCombo
Set gr.Columns("Status").DropD ownControl = Me.grDropDown.Object
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,
'' Rs.Open ("StatusQry")
'' Set Rs = CurrentDB.openRecordset("S
'setting the recordset
gr.HoldFields
Set gr.Recordset = Rs
Set gr = Me.GridEX1.Object
gr.Columns("Status").EditT
Set gr.Columns("Status").DropD
Set gr = Me.GRIDEX2.Object
gr.Columns("Status").EditT
Set gr.Columns("Status").DropD
ASKER
yes of course Dave - but
what to do at line
Set gr.Recordset = Rs
and beyond - that is where I am stuck
what to do at line
Set gr.Recordset = Rs
and beyond - that is where I am stuck
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
Janus supports DAO 3.6 and DAO 2.x
We moved to mysql backend with unbound forms - running now on DAO 2.1 - Thanks
ASKER
I changed all code back to DAO - thanks
Dave