Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dataview sorting problems

Posted on 2008-10-08
1
Medium Priority
?
410 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 1500 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

972 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