I need to check if my res
from dbSendQuery()
is over.
My code is like this:
db <- dbConnect(drv=SQLite(),flags=SQLITE_RW,dbname="db.sqlite",synchronous = "off")
dbBegin(db)
res <- dbSendQuery(db,"Update Operation SET Name = 'teste' where Id = 1")
if("my SendQuery is over"){
dbClearResult(res)
dbCommit(db)
dbDisconnect(db)
}
I need to know when it is over to send this to commit and then disconnect.
UPDATE 1 Im my sistem, for this example above can happen with more than 1 users simultaneous. Then, when the first connection in db is over, i need to finish him requisition and provide to the other connection the possibility to write your query.