Hi everyone. I'm using sqlite3 in Linux and I currently have a problem. I have a database and 2 tables in it: db1 and db2. db1 has 3 columns: empID, empName, empAddr. db2 has just 1 column: empID and its value is set to 0 by default.
I created a C program that continuously polls the 2nd database db2 for any changes in the value of empID. Depending on the new value of empID in db2, the program fetches the corresponding info from db1. For example, if the value of empID in db2 is changed to 1, the program looks for the information (empName and empAddr) from db1 that corresponds to an empID equal to 1. However when I run 2 terminals: 1 for manually changing the value of empID in db2 and another 1 for running the C program, I encountered the problem of a locked database. While the program is running and accessing the database, I want to change the value of empID in db2 but I understand that since my C program is accessing it, I cannot update the value of empID (unless I close the terminal running the program). So my question is, is there a way to update/change the value of empID in db2 while I'm accessing db2 through my program? Answers will be greatly appreciated. Thank you.