Topic: Replace an existing record

Hello, I know how to avoid duplicates in a table but how to modify an existing record and replace it.

Destiny

Re: Replace an existing record

Destiny wrote:

Hello, I know how to avoid duplicates in a table but how to modify an existing record and replace it.

this is vague. are you perhaps looking for script? sql query?
if sql query, then you can use UPDATE or INSERT OR REPLACE query.

Something like...

INSERT OR REPLACE INTO `yourtable`(id, yourfield) VALUES (1, 'test2');

or

UPDATE `yourtable` SET `yourfield`='test2' WHERE id=1;
brian

Re: Replace an existing record

It all depends on how you want to proceed, if using the user interface only, you can use a button with "show record" property which will open the record into a form. You can also use the in-place edit, a tablegrid property (editable) or use SQL Queries as shown by Brian.zaballa.

4 (edited by Destiny 2023-11-11 08:14:09)

Re: Replace an existing record

The code for 'Duplicates' does not allow you to save already existing data,
how to modify a record that is already present in the table.

Destiny

Re: Replace an existing record

Check this out
https://myvisualdatabase.com/forum/viewtopic.php?id=588