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
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
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