K
K
Kolya2015-06-20 19:07:15
C++ / C#
Kolya, 2015-06-20 19:07:15

How to make the DataGridView save correctly when the data changes?

oleDbDataAdapter->Update(dataSet->Tables["Название таблицы"]);

I save like this, but instead of saving only the record that was edited, all other records in the table are replaced by the edited record. How to fix?
I use the following sql code to update records:
UPGRADE table
SET column1 = ?, column2 = ?, column3 = ?, column4 = ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2015-06-21
@Dev_Kpug

And where WHERE, of course, UPDATE in this form updates all records, one more column with record Id is needed.
Here is an example https://msdn.microsoft.com/ru-ru/library/system.da... (v=vs.110).aspx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question