vb.net - Error "Unable To Find Table Mapping Or Data Table" when trying to update MSSQL table via datagridview -
hi using datagridview display data sql server, want when edited cell in datagridview database table updated too. code populating datagridview this:
dim datest sqldataadapter = new sqldataadapter("select * tblpaymtc", strcon) dim cbtest sqlcommandbuilder = new sqlcommandbuilder(datest) dim dstest dataset = new dataset datest.fill(dstest) dg1.datasource = dstest.tables(0)
when button clicked use code:
datest.update(dstest)
any appreciated.
add line too...
dg1.datamember = "tblpaymtc"
Comments
Post a Comment