FW MariaDB/MySql native
Posted: Wed Dec 30, 2020 9:36 am
Hi to all Forum:
First of all I congratulate you on the holidays and wish you a good exit to the year of 2020 (screwed) and a better entry into 2021.
I would need help for the following: I have started to make examples of a CRUD of a table with the native functions of FWH (Ver. 16.10), and the code is similar to what I show:
1) I open the recordset and add a blank record
2) I manipulate the fields
3) Finally, I save the record.
If the server does not give any errors, it works perfectly. The problem is that the table I am manipulating has a UNIQUE index in the "Codigo" field, so if I try to create a record with an existing code, it gives me an error, but the problem is that it is as if the pointer moved and gets lose their values (they go blank). Do you know or do you have any example to be able to carry out this basic process?
Best regards, and thank you very much.
First of all I congratulate you on the holidays and wish you a good exit to the year of 2020 (screwed) and a better entry into 2021.
I would need help for the following: I have started to make examples of a CRUD of a table with the native functions of FWH (Ver. 16.10), and the code is similar to what I show:
1) I open the recordset and add a blank record
Code: Select all
oRs:=oConnection:Rowset("select * from operators")
....
oRs:Add()
Code: Select all
oRs:Codigo:= ¿¿¿¿¿
oRs:Nombre:= ?????
Code: Select all
oRs:Save()
Best regards, and thank you very much.