Saving Object as Dataset?

Shaitan00

Junior Contributor
Joined
Aug 11, 2003
Messages
358
Location
Hell
Given an Object Array [private object[] objArr;] which houses DataSets (ds) with corresponding Index (Index) [objArr[Index] = ds;]

I want to retrieve (ds) corresponding to the Index supplied and store it in a dataset [rec].

Code:
rec = objArr[Index];

First of all, does this method return the object corresponding to the Index supplied? [i.e.: if I put objArr[1]) if I do objArr[1] it should return the ds right?].

My problem seems to stem from the fact that it is returning an OBJECT which I am trying to save as a Dataset [rec], I assume I must cast it back as a Dataset?

Any clues?
 
Last edited:
The Error recieved when trying to set the Dataset [rec] = object in array is as follows:

Cannot implicitly convert type 'object' to 'System.Data.DataSet'

How would I cast [I assume I need to cast] the object as a Dataset [even if it actually is a Dataset that I originally put in the Array].?????

There must be a really simple answer to this or a much better implementation.
 
Back
Top