What I'm getting is slSelBind is a method of using "Prepared Statement Object" in SQLite In an ERP system there is something called "requirements explosion" and I have programmed it, works ok, but it takes time. This slSel-sts is executed 220 times for a particular item: "SELECT MTRLNR, POS, QUANT, FROM_VECKA, TOM_VECKA, SORT_1 FROM STR WHERE ARTNR =" + $ SQ + TRIM $ (ARTNR) + $ SQ + "ORDER BY MTRLNR" Instead, I've tried this: slFIX = slBuildBindDat ("$ SQ + TRIM $ (ARTNR) + $ SQ") .. .. slSelBind ("SELECT MTRLNR, POST, QUANTITY, FROM_VECKA, TOM_VECKA, SORT_1 FROM STR WHERE ARTNR =? ORDER BY MTRLNR", slFIX, SET_NUMMER_TABELL (NIVA))
But it does not work, I think wrong, but I do not know what.
Your proposal did not affect the situation. What I can see, a failed INSERT causes the database to be locked when I try with a REPLACE instead. It only applies in local mode. At the moment, I solve it by doing slClose immediately followed by a slOpen. in case of a failed INSERT. I will return later with an example. / Fim W.
I am building a smaller ERP system with Powerbasic and SQLitening. It works as it should when I run in Remote mode. But when I run in Local mode I get "Database locked" every now and then. It does not appear to be a systematic error. Does anyone have a tip where to look for the error? /Fim W.