c# - Insert rows on a existing dataset -


i have dataset called "titulos" , have 1 table there called "tb" columns name "titulo","titulo 2" , "titulo3". i'm trying insertion of rows in event onclick of button reason code doesn't work! dataset on xsd file , using visual studio 2013 c#. tried code don't know how apply in situation:

northwinddataset.customersrow newcustomersrow =  northwinddataset1.customers.newcustomersrow();  newcustomersrow.customerid = "alfki";  newcustomersrow.companyname = "alfreds futterkiste";  northwinddataset1.customers.rows.add(newcustomersrow); 

the problem shows error saying not recognize dataset... erros : "the name " ds_admissibilidade" not exist in current context

a dataset disconnected copy of data. forgets if data originated database, xml file or else. when add rows dataset, change in-memory copy, not original source.

you need mechanism update source. databases, table adapter or dataadapter you. file source, need serialize dataset file, reverse of way read in in first place.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -