My java code is working, but when adding data to an SQL table, the fields are being filled in as NULL, even though I have added values.
Part of the code where the insert occurs:
%pre%
NOTE: The code was working correctly. The error started when I added a method of data removal. I used the command:
%pre%
To delete the last record inserted in the table (removed by ID).
Instead of deleting the last record, it erased all the data in the table and from then started to enter the values as NULL.
______ azszpr154503 ___
Thanks for the feedback, I was able to solve the problem with the help of my faculty teacher, the error was as follows, in my class provider, which has the implementation of the methods, I put to extend my class clientCast (extends customerCast) where it has the visual part, and when it gave 'stmt.setString' with the textfield, it always took the values of the other class, which are null. To solve, in the method of the class CustomerCode I passed the textField by parameter, and I went on until arriving at the class provider, then I set the set in my variables
___