Solved

Dataview sorting problems

Posted on 2008-10-08
1
367 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
Comment Utility
The datatype int in SQL means Int16 in VB.NET. So you can do GetType(Int16) instead of Integer.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now