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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -