Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 November 29th, 2004, 03:24 PM
Authorized User
 
Join Date: Nov 2004
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default fill an array from a dataset

HI
i have a data filled in a dataset
is there any possibility in asp.net to fill this array from this dataset and how?

thanks

Georges M. Kaddoum
__________________
<GMK>
 
Old November 30th, 2004, 09:20 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,
I didnt get your meaning exactly but every DataRow object in DataSet has a property called ItemArray ... I think you can use it,
Code:
DateRow dr=objDataSet.Tables[i].Rows[j];
object[] temp=dr.ItemArray;
DateTime dt=(System.DateTime)temp[0];
//Thought first column represents a date
There is a table map between Sql datatype and .NET data type so you should cast elements of ItemArray according to this table-mapping,
for example,
nvarchar(sql)---------->System.string(.NET)
datetime(sql)---------->System.DateTime(.NET)
Money(sql)---------->System.Decimal(.NET)
HtH.

_____________________________
Mehdi.
software engineering student.
Looking for a good job for summer 2005.





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to fill a dataset from a gridview sigilaea ASP.NET 2.0 Basics 3 July 19th, 2007 03:16 PM
Fill(dataset) or dataset.load() salemkoten SQL Server 2005 1 November 2nd, 2006 11:04 PM
fill dataset with oracle sp p2pMember ASP.NET 1.0 and 1.1 Professional 1 October 4th, 2006 04:19 AM
fill two-dimensional array tobian Excel VBA 0 February 21st, 2006 05:55 PM
How to fill stored procedure in dataset. jayaraj ADO.NET 4 August 2nd, 2004 02:40 AM





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