Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1108527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:05:51+00:00 2026-05-17T02:05:51+00:00

all is in the title :-) Some explanation : In order to use a

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T02:05:51+00:00Added an answer on May 17, 2026 at 2:05 am

    For your recordset, you would want to use the following code:

    Dim conn As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    Set rs = New ADODB.Recordset
    
    conn.Open "YourDSN", "username", "pwd" ' Or other appropriate conn string here
    
    rs.Open strSelect, conn ' This is your OpenResultset equivalent
    

    And then for each combobox, call

    Call LoadCombo(cboOne, rs) 
    Set rs = rs.NextRecordset  ' Instead of Fp.rs.MoreResults    
    ...
    

    If you haven’t already, you’ll need to add the ADO reference to your project (probably Microsoft Active Data Objects 2.8)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The title pretty much says it all. Some caveats are: I need to be
The title pretty much says it all. When I'm doing some reflection through my
Actually my question is all in the title. Anyway: I have a class and
I have an Android activity which has a header, some title text, and then
Question title says it all really - a lot slower than VS2005, with a
The title should say it all, then I can solidify 2 more ticks on
The title pretty much says it all. I'm using a TClientDataset to store an
Title more or less says it all. Specifically, I've become increasingly annoyed that in
How do I select all records that contain LCS within the title column in
I think the title pretty much says it all... I'm looking to implement an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.