How to new a DataRow ?

A

ad

I am using the new feature of TableAdapter in VS2005.
I want to new a typed DataRow, I use the codes:

System.Data.DataRowBuilder rb;
MyDataSet.myRow rowMine = new MyDataSet.myRow(rb);

But it failed.

How can I new a DataRow?
 
G

Guest

The table object should have a NewRow method you can use.
MyDataSet.myRow rowMine = MyDataSet.NewRow();
 
C

Cor Ligthert [MVP]

Ad,

There are very much methods to add a new rows, the most raw one is in my
opinion

DataRow dr = MyTable.NewRow();
and than what you don't have
MyTable.Rows.Add(dr);

However this is one of the endless posibilities.

Cor
 
A

ad

But if the MyTable did'nt instance.
Could we new a record as the structure of that table?
 

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

Top