By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,894 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,894 IT Pros & Developers. It's quick & easy.

Array of two dimensions unknown

P: n/a
Hi,

I need to instance an object of type array (of two dimensions), but i dont
know what are the integers of two dimensions.

I take from database some data and i would like to use the SetValue ann
filling this way the array...

Its possible to make this?
--
Thanks
Regards.
Josema
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Josema,

I believe you want to use DataAdapter.Fill(DataSet). The resulting
DataSet will contain DataTables in a two dimensional array of sorts that
you can use later on. DataSet.Tables[0].Columns and Rows would be the
size to use for the Array, although I'm not sure why you want to use an
Array.

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2

P: n/a
Hi,

How are you getting the data from the DB?
You cannot use a DataReader as you do not know the length if it in advance,
or maybe you can use it if you use a SP and declare a parameter as out then
you can return the quntity of rows you are returning.
in the other hand, will the qty of columns change?

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Josema" <Je******@ocu.org> wrote in message
news:17**********************************@microsof t.com...
Hi,

I need to instance an object of type array (of two dimensions), but i dont
know what are the integers of two dimensions.

I take from database some data and i would like to use the SetValue ann
filling this way the array...

Its possible to make this?
--
Thanks
Regards.
Josema

Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.