Solved

Dataview sorting problems

Posted on 2008-10-08
1
379 Views
Last Modified: 2012-05-05
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.
0
Comment
Question by:mfony
1 Comment
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 22676630
The datatype int in SQL means Int16 in VB.NET. So you can do GetType(Int16) instead of Integer.
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question