DataSet Rows 
Author Message
 DataSet Rows

How do you add a Row to a DataSet?

In VS I have:

DataSet __gc* dsReturn;
dsReturn->Tables->Add("INITS");

I have read that you can then do:

dsReturn->Tables("INITS")->Rows->NewRow; //or something like this

But after I have put:

dsReturn->Tables("INITS")->

The IntelliSense tells me 'Could not understand expression to the left of .
or ->'

Any ideas? thanks Gav



Sat, 23 Jul 2005 18:56:59 GMT  
 DataSet Rows
GAV,

Quote:
> How do you add a Row to a DataSet?

> In VS I have:

> DataSet __gc* dsReturn;
> dsReturn->Tables->Add("INITS");

> I have read that you can then do:

> dsReturn->Tables("INITS")->Rows->NewRow; //or something like this

> But after I have put:

> dsReturn->Tables("INITS")->

You'll want to do
 dsReturn->Tables[S"INITS"]->Rows->Add(newRow);

--
Tomas Restrepo



Sat, 23 Jul 2005 19:15:59 GMT  
 DataSet Rows
Tomas, This didn't work! Just got error messages:

Left of '->Rows' must point to class/struct/union



Quote:
> GAV,

> > How do you add a Row to a DataSet?

> > In VS I have:

> > DataSet __gc* dsReturn;
> > dsReturn->Tables->Add("INITS");

> > I have read that you can then do:

> > dsReturn->Tables("INITS")->Rows->NewRow; //or something like this

> > But after I have put:

> > dsReturn->Tables("INITS")->

> You'll want to do
>  dsReturn->Tables[S"INITS"]->Rows->Add(newRow);

> --
> Tomas Restrepo




Sat, 23 Jul 2005 19:24:49 GMT  
 DataSet Rows
What would be easier... is there a way in the SQL statement I can specify
that I only want the first letter of each field?
Quote:

> Tomas, This didn't work! Just got error messages:

> Left of '->Rows' must point to class/struct/union



> > GAV,

> > > How do you add a Row to a DataSet?

> > > In VS I have:

> > > DataSet __gc* dsReturn;
> > > dsReturn->Tables->Add("INITS");

> > > I have read that you can then do:

> > > dsReturn->Tables("INITS")->Rows->NewRow; //or something like this

> > > But after I have put:

> > > dsReturn->Tables("INITS")->

> > You'll want to do
> >  dsReturn->Tables[S"INITS"]->Rows->Add(newRow);

> > --
> > Tomas Restrepo




Sat, 23 Jul 2005 19:31:20 GMT  
 DataSet Rows
Gav,

Quote:
> Tomas, This didn't work! Just got error messages:

> Left of '->Rows' must point to class/struct/union

Sorry my bad. That should've been
dsReturn->Tables->Item[S"INITS"]->Rows->Add(newRow);


Sun, 24 Jul 2005 02:00:28 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Adding A New Row To A Dataset

2. DataSet Issue : How do I add a Row to a DataTable with Identity Column

3. trouble deleting a row from a dataset

4. delete row in disconnected dataSet

5. passing a SQL datareader or dataset with 1000 rows and 10 columns

6. XmlDataDocument.DataSet.ReadXML only returns 1 row

7. Searching specific row in the dataGrid and dataSet

8. Current dataset data row...

9. can we assign two colums from one dataset to another dataset

10. How to avoid user from entering a new row into the datagrid[which already contains rows]

11. single row updates effect multiple rows....

12. How to save dataset to the table of your choice when the dataset is created from datatables?

 

 
Powered by phpBB® Forum Software