kovan
Aug 23rd, 2000, 07:11 AM
anyone could help me out with the following...
this is from another thread i posted,
here is DAO code
if anyone could take few min and give me the ADO version
i would greatly appreciated..
so i can do neccessary changes to my project
please and thank you
i think i will convert
after realizing my coding sucks
i decided to change my coding if it wont take more than a week of time
here are few things i like to know
(question mark(?) representing what woudl ADO version would be..
dao" dim db as database"
ado "?"
dao "dim rs as recordset"
ado "?"
dao "set db = OpenDatabase("myBadDatabase.MDB")"
ado "?"
dao "sql="SELECT * FROM MyTable""
"set rs = db.opendatase(sql)"
ado "?"
HERE IS A EXAMPLE FROM MY PROJECT (DAO)
if anyone would be kind enough to rewrite that with ADO
i would greatly appreciated, since it will help me do my conversion
[CODE]
Public Sub LoadManufacturer(cboBox As Object, Optional idx As Integer = -1)
SQL = "SELECT * FROM manufacturer"
Set ManufRecord = MeterInfo.OpenRecordset(SQL)
With ManufRecord
If .EOF Then
MsgBox "ERROR: Manufacturer table found to be empty"
Else
If idx = -1 Then
Do Until .EOF
cboBox.AddItem !Manu
.MoveNext
Loop
'cboBox.ListIndex = 0
Else
Do Until .EOF
cboBox(idx).AddItem !Manu
.MoveNext
Loop
'cboBox(idx).ListIndex = 0
End If
End If
End With
End Sub
[CODE/]
this is from another thread i posted,
here is DAO code
if anyone could take few min and give me the ADO version
i would greatly appreciated..
so i can do neccessary changes to my project
please and thank you
i think i will convert
after realizing my coding sucks
i decided to change my coding if it wont take more than a week of time
here are few things i like to know
(question mark(?) representing what woudl ADO version would be..
dao" dim db as database"
ado "?"
dao "dim rs as recordset"
ado "?"
dao "set db = OpenDatabase("myBadDatabase.MDB")"
ado "?"
dao "sql="SELECT * FROM MyTable""
"set rs = db.opendatase(sql)"
ado "?"
HERE IS A EXAMPLE FROM MY PROJECT (DAO)
if anyone would be kind enough to rewrite that with ADO
i would greatly appreciated, since it will help me do my conversion
[CODE]
Public Sub LoadManufacturer(cboBox As Object, Optional idx As Integer = -1)
SQL = "SELECT * FROM manufacturer"
Set ManufRecord = MeterInfo.OpenRecordset(SQL)
With ManufRecord
If .EOF Then
MsgBox "ERROR: Manufacturer table found to be empty"
Else
If idx = -1 Then
Do Until .EOF
cboBox.AddItem !Manu
.MoveNext
Loop
'cboBox.ListIndex = 0
Else
Do Until .EOF
cboBox(idx).AddItem !Manu
.MoveNext
Loop
'cboBox(idx).ListIndex = 0
End If
End If
End With
End Sub
[CODE/]