-
Dec 5th, 2019, 04:19 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Option in ADODC or DataGrid components to update existing row?
I am using ADODC component with select query to feed the DataGrid component with data.
Everything works fine except, the thing I don't know how to update existing row instead of adding new one.
There are two columns in the datagrid which serve as keys. When i add another row with the same combination of those two key columns, the datagrid saves another row in the table.
Yes, the table should be set to have two keys, but its not, and i don't want to set keys, because its a legacy application and I might break other parts of it.
Is there some option to tell either ADODC or DataGrid component to update existing row with that same combination of keys instead of adding a new row?
Or I should add keys to my table, and explore where the application will break next?
Last edited by kutlesh; Dec 5th, 2019 at 04:27 AM.
-
Dec 5th, 2019, 05:34 AM
#2
Thread Starter
Addicted Member
Re: Option in ADODC or DataGrid components to update existing row?
Tried adding keys to the tables. DataGrid shows error message of adding rows with duplicate keys, but the form need to be closed to be used again
-
Dec 5th, 2019, 08:13 AM
#3
Re: Option in ADODC or DataGrid components to update existing row?
You have to edit the existing row
-
Dec 5th, 2019, 11:57 PM
#4
Re: [RESOLVED] Option in ADODC or DataGrid components to update existing row?
If you polled all of the experienced VB6 programmers, I reckon there would be very few using the Data Control.
Your choice, but I would recommend learning to use pure ADO code instead.
You will get better assistance if you do, because most of the experienced VB6 programmers are more familiar with the non Data Control approach.
Rob
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|