Link to home
Start Free TrialLog in
Avatar of mfony
mfony

asked on

Dataview sorting problems

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)
or
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.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial