|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Import DataRowI 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 Petrov wrote:
> I have a problem with importing a row in datatable. Maybe some code would help us help you.> 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 > 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 ------------------------ "Nikolay Petrov" <johnt***@mail.bg> wrote in message I've got a typed dataset DS with a table in itnews:1119988887.910094.197370@f14g2000cwb.googlegroups.com... 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,
As Ken don't I see why you use the importrow. I don't know if this affect it, however your row has AFAIK not even a rowstate. Add would work in this case and set with that the rowstate to Added. See here a sample of using ImportRow on our site. http://www.windowsformsdatagridhelp.info/default.aspx?ID=88584022-3c90-4dcb-baa3-c08393f16ce9 I hope this helps, Cor 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
Update MS Access Database Records
Wierd menu crash Convert windows SHFILEINFO to DotNet Beating a dead Horse: Which Language Strange behavior Obstruct the Developpers to Develop and Deploy a newer version A mathematical issue Calculating text width when printing Strange reference issue Finding the leftmost pixel in a piece of text when using GDI+ |
|||||||||||||||||||||||