.setordinal() element not accessible

I am trying to convert XML files to flat, pipe-delim output.

The approach I've chosen is to import into a dataset, do field and fieldvalue validation and write out to the delimited text file.

Sometimes a node is missing in the xml data, but the flat file must have all fields so i am checking the layout before creating the output file and inserting missing columns in the dataset.

When I try to set the ordinal position, I am getting an error.
System.data.datacolumn.private sub setordinal(ordinal as integer) is not accessible because it is 'private'.

I am using Visual studio 2008
The method the code is in is a private sub, but I shouldn't have thought that would affect it.

The structure of the code is:
(this is not real - just a layout to illustrate the problem)

Public class widget
Private sub process_Stuff()
Dim DS as new dataset
' populate DS from xml file
' check structure
' do more stuff
end sub

Private sub CheckStructure(dsData as Dataset)
' check if any missing columns by comparing to a field list
' if so, add the column and set it's position in the table
' get list if fields in dsFieldlists
' add column
with dsdata
 For Each dr As DataRow In dsFieldLists.Tables("Detail").Rows
       If .Tables(cDetail).Columns.Contains(dr("FieldName")) = False Then
            CreateField(.Tables(cDetail), dr("FieldName"), dr("FieldType"))
           ' no intellisense error, no compile error but runtime error is as above
        End If
end with
end sub

end Class

any ideas?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mimpactAuthor Commented:
My point exactly - however one of your links solves the problem - setordinal is a framework 2+ function - this is a legacy codebase developed in 1.1

what's involved in changing the project to target v2+?
Ah. Open the solution in VS2005 and it will ask you to upgrade it and will upgrade it for you if you agree.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.