Hello, all is in the title :-)
Some explanation :
In order to use a vb6 with C# (COM / Interop) I have a performance issue with Data Access. I don't know why but the code is four times slower in C# via Interop.
I'm trying to find a workaround and I would to replace the rdo by ADO to gain performance.
old code (with rdo) :
strSelect = _
QUERY1 & ";" & _
QUERY2 & ";" & _
QUERY3 & ";" & _
QUERY4 & ";" & _
QUERY5 & ";" & _
QUERY6
'Fp.Cn is a rdoConnection
Set Fp.rs = Fp.Cn.OpenResultset(strSelect)
'ComboBox 1
Call LoadCombo(cboOne)
Fp.rs.MoreResults
'ComboBox 2
Call LoadCombo(cboTwo)
Fp.rs.MoreResults
'ComboBox 3
Call LoadCombo(cboThree)
Fp.rs.MoreResults
'ComboBox 4
Call LoadCombo(cboFour)
Fp.rs.MoreResults
'ComboBox 5
Call LoadCombo(cboFive)
Fp.rs.MoreResults
'ComboBox 6
Call LoadCombo(cboSix)
Fp.rs.MoreResults
Fp.rs.Close
Now the code in LoadCombo :
Public Sub LoadCombo(ByRef cboComboBox As ComboBox, ByRef rslResultSet As rdoResultset)
cboComboBox.Clear
With rslResultSet
While Not .EOF
cboComboBox.AddItem .rdoColumns(1)
cboComboBox.ItemData(cboComboBox.NewIndex) = .rdoColumns(0)
.MoveNext
Wend
End With
End Sub
How to modify this code with ADO ?
Regards,
Florian