Expand my Community achievements bar.

save and update entered data in database

Avatar

Level 5

Hi All.

I created simple form in LiveCycle Designer and link that form to Access database. Now I would like to SAVE entered data in database and UPDATE existing record. I wrote JavaScript code for SAVE button in click event:

var query = 'INSERT INTO Table1 (Ticket_No, Date, Model) values ("Ticket_No", "Date", "Model")';


statement.execute(query);


Ticket_No.rawValue = ""; // clear after inserting

Date.rawValue = "";

Model.rawValue = "";

But when I click button nothing saved in database. When I manually enter data in database table and then run form I can see data in the according form fields. So I'm thinking connection is fine. How to fix problem and save entered? And how to create code for UPDATE button to update existing record?

Thanks.

0 Replies