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

  • SEARCH
  • Home
  • 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 6144737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:41:42+00:00 2026-05-23T18:41:42+00:00

I have some code from this site CodeProjectLink to convert a datatable to a

  • 0

I have some code from this site CodeProjectLink to convert a datatable to a recordset. This code had been working fine until I changed to .NET 4 (was previously 2), now when I call the following line:

Dim result As New ADODB.Recordset()
result.CursorLocation = ADODB.CursorLocationEnum.adUseClient

Dim resultFields As ADODB.Fields = result.Fields
Dim inColumns As System.Data.DataColumnCollection = inTable.Columns

    For Each inColumn As DataColumn In inColumns
        ' The next line gives the error
        resultFields.Append(
            inColumn.ColumnName, 
            TranslateType(inColumn.DataType), 
            inColumn.MaxLength, 
            IIf(inColumn.AllowDBNull, 
                ADODB.FieldAttributeEnum.adFldIsNullable, 
                ADODB.FieldAttributeEnum.adFldUnspecified), 
            Nothing)

    Next

I get this strange error:

Error: Missing method ‘instance void MYDLLNAME ADODB.Fields::Append(string,valuetype ADODB.DataTypeEnum,int32,valuetype ADODB.FieldAttributeEnum,object)’ from class ‘ADODB.InternalFields’.

I tried changing my line to just:

resultFields.Append(inColumn.ColumnName, TranslateType(inColumn.DataType)) 

but this gave the same error. The TranslateType function is correctly returning ADODB.DataTypeEnum.adVarChar so this seems valid as well

  • 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-23T18:41:43+00:00Added an answer on May 23, 2026 at 6:41 pm

    For anyone interested in this I have managed to work round this by creating a COM exposed custom class that holds a public DataTable that I can access from my VB6 app. This takes out the requirement for conversion to a Recordset as I am not doing any data binding etc. so not a solution for all scenarios but a good solid work around in my case.

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

Sidebar

Related Questions

I currently have some code which grabs some JSON from a site. This is
I have some code doing this : var changes = document.getElementsByName(from); for (var c=0;
I have this kind of code in some applications (from microsoft) [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage( Microsoft.Naming,
I have this code that fetches some text from a page using BeautifulSoup soup=
I use this bit of code to feed some data i have parsed from
I have pasted some code from Jon Skeet's C# In Depth site: static void
I have some JS on my site that should prevent the following code from
I have inherited some code (from zip file) from a developer and git initialzed,
I have some code to read from a pdf file. Is there a way
I have ported some LGPL code from Java to C#, which I plan to

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.