Solved

Dataview sorting problems

Posted on 2008-10-08
1
375 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 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