R
rodchar
hey all,
this is what i thought would make sense to me but got the infamous "Object
not instantiated" error:
DataTable dt;
dt = mySprocDt;
DataTableCollection dtColl = null;
dtColl.Add(dt);
instead i had to do this to make it work:
DataSet ds = new DataSet( );
DataTableCollection dtColl = null;
DataTable dt = null;
dt = mySprocDt;
ds.Tables.Add(dt);
dtColl = ds.Tables;
can someone please explain why the first one didn't work?
thanks,
rodchar
this is what i thought would make sense to me but got the infamous "Object
not instantiated" error:
DataTable dt;
dt = mySprocDt;
DataTableCollection dtColl = null;
dtColl.Add(dt);
instead i had to do this to make it work:
DataSet ds = new DataSet( );
DataTableCollection dtColl = null;
DataTable dt = null;
dt = mySprocDt;
ds.Tables.Add(dt);
dtColl = ds.Tables;
can someone please explain why the first one didn't work?
thanks,
rodchar