Array of two dimensions unknown

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top