Android Question DBUtils.DeleteRecord

mikele

Member
Hello,
I can't delete a record from the database through the code;

Dim m As Map
m.Initialize
m.Put("codice", "VERDI")
DBUtils.DeleteRecord(SQL, EtxNoSq.Text,m)

LOG;
DeleteRecord: DELETE FROM [resr01] WHERE [codice] = ?

clearly the record exists in the table [resr01]

LOG;
BIANCHI
MARIO BIANCHI
ROSSI
MARIO ROSSI
VERDI
MARIO VERDI

thank you
 

Brian Dean

Active Member
Licensed User
Your post has got halfway down the second page of the forum without receiving any replies. That usually suggests that someone has asked an unanswerable question.

We all know that DBUtils is a tried and tested module, so there must be a a bug in your code, of course. In this line ...
B4X:
DBUtils.DeleteRecord(SQL, EtxNoSq.Text,m)
... nobody knows what is in "ExtNoSq.Text". Maybe it is not the correct table name - it could be anything. Keep looking; we have all been there. You are not alone.
 

mikele

Member
Thank you,
Right now I found the problem, in fact it is absolutely in my code.
when inserting the fields (taken from Ms Sql) the characters "filler" spaces were also inserted.
Then the record is successfully deleted with:
m.Put ("code", "VERDI ") (FIELD OF 13 CHARACTERS).
When creating the table, not having specified the number of characters for the fields, I thought it was NvarChar ....

M.
 
Top