Chris,
Just tested results (without using :inmemory: database) with and without binding and works perfectly.
Just tested results (without using :inmemory: database) with and without binding and works perfectly.
#INCLUDE "sqlitening.inc" FUNCTION PBMAIN AS LONG LOCAL sfirst AS STRING LOCAL sLast AS STRING LOCAL srowid AS STRING LOCAL changes AS LONG slopen "test.db3","C" slexe "create table if not exists clients(first TEXT,last TEXT)" sfirst="Heidi" sLast="Klum IF Insertclient(sFirst,sLast) = 1 THEN ? "Insert 1-record",,"INSERT" sFirst = "Heidi" sLast = "Kaulitz sRowId = "1" IF Updateclient(sRowId,sFirst,sLast) = 1 THEN ? "Update 1-record",,"UPDATE" Sel "select * from clients" IF DeleteClient("1") = 1 THEN ? "Delete 1-record",,"DELETE" END FUNCTION FUNCTION InsertClient(BYVAL sfirst AS STRING, BYVAL sLast AS STRING) AS LONG DIM s(1 TO 2) AS STRING s(1) = slbuildbinddat(sfirst,"T") s(2) = slbuildbinddat(slast ,"T") slexebind "insert into clients values(?,?)",JOIN$(s(),""),"V2" FUNCTION = slGetChangeCount END FUNCTION FUNCTION UpdateClient(sRowID AS STRING,sFirst AS STRING,sLast AS STRING) AS LONG slexe USING$("update clients set first='&',last='&' where rowid=&",sFirst,sLast,sRowId) FUNCTION = slGetChangeCount END FUNCTION FUNCTION DeleteClient(sRowID AS STRING) AS LONG slexe "delete from clients where rowid="+sRowId FUNCTION = slGetChangeCount END FUNCTION FUNCTION Sel(sql AS STRING) AS LONG LOCAL sArray() AS STRING IF slselary(sql,sArray(),"Q9c E0") THEN ? sql + $CR+ slGetError,%MB_ICONERROR,"Sel" ELSE ? JOIN$(sArray(),$CR),%MB_SYSTEMMODAL,"Sel" END IF END FUNCTION
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment