Import DataRow

  • Thread starter Thread starter Nikolay Petrov
  • Start date Start date
N

Nikolay Petrov

I have a problem with importing a row in datatable.
When using the Table.ImportRow, the row isn't imported.
Why?
I've checked the rows count and it doesn't increase.
no exeptions are thrown
 
Nikolay said:
I have a problem with importing a row in datatable.
When using the Table.ImportRow, the row isn't imported.
Why?
I've checked the rows count and it doesn't increase.
no exeptions are thrown

Maybe some code would help us help you.

Chris
 
I've got a typed dataset DS with a table in it
dim dr as datarow
dr=DS.Tables(0).NewRow
'Code to set the idems of the row
dim DS2 as dataset
ds2=ds1.clone
ds2.tables(0).ImportRow(dr)
 
Hi,

Try adding some data to dr.

Ken
------------------------
I've got a typed dataset DS with a table in it
dim dr as datarow
dr=DS.Tables(0).NewRow
'Code to set the idems of the row
dim DS2 as dataset
ds2=ds1.clone
ds2.tables(0).ImportRow(dr)
 
There is data, i've just skipped it here in the example.
I can see the data in the debug window.
It is there, but the row is not imported at all.
 
Nikolay,

Add throws an exeption that the row belongs to onother table?

Give next time direct this kind of information. Than we see it probably
mostly direct.

\\\\
dim dr as datarow
'Code to set the idems of the row
dim DS2 as dataset
ds2=ds.clone
dr=DS2.Tables(0).NewRow
ds2.tables(0).Add(dr)
///
I hope this helps,

Cor
 

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