Dataview sorting problems
Posted on 2008-10-08
I have a specific application where I have merged two datasets and need to sort them.
The first dataset is from an SQL 2000 database where the field (codeID) is int.
The second dataset is derived from the first where I outline all of the fields and the field (codeID) is GetType(Integer)
I can merge the tables of the datasets together with no problem using:
DS.Tables("Dataset_SQL").Merge(Dataset_Derived, False, MissingSchemaAction.Ignore)
I can then put the merged information into a dataview and sort it by the field in question. The problem starts from the fact that the dataview sorts the numbered information as text ( 1, 10, 11, 12, 13,...)
In order to preserve the schema, when I try to merge the tables together using:
DS.Tables("Dataset_SQL").Merge(Dataset_Derived, False, MissingSchemaAction.Add)
I get the error message:
Message="<target>.codeID and <source>.codeID have conflicting properties: DataType property mismatch."
Can I find out exactly the datatype of the codeID field of the 1st dataset and construct the derived as such?
Any help will be greatly appreciated.