Wrox Programmer Forums
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 4th, 2005, 12:04 PM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default WHAT???

Why is ADO.net treating my integer field as text? from the following code

drArray = ds.Tables("Products").Select("fkCategory=1", "intOrderOfAppearance ASC")

I get records sorted by intOrderOfAppearance, except instead of

{1,2,3,4,5,6,7,8,9,10,11,12 etc.}

I get

{1,10,11,12,13,14,15,16,17,18,19,2,20,21 etc.}

Do I need to strongly type my whole dataset just to have it treat my integers as integers??? It seems like a lot of trouble (what I've read so far about creating strongly-typed datasets makes it seem like a bit of an ordeal).

Thanks in advance.

Aaron

 
Old April 4th, 2005, 10:14 PM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks guys.

I figured this out. You have to call the DataSet.FillSchema method before you call the Fill method. Thanks anyway.

Aaron










Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.