• Welcome, Guest. Please login.
 
May 18, 2021, 06:18:37 PM

News:

Welcome to the SQLitening support forums!


Recent posts

Pages1 2 3 ... 10
1
Have only seen callbacks with SQLite on the PowerBASIC forum:
https://forum.powerbasic.com/forum/user-to-user-discussions/powerbasic-for-windows/37810-sqlite-query-with-callback
https://forum.powerbasic.com/forum/user-to-user-discussions/source-code/37809-very-simple-sqlite-3-5-7-e-g-with-callback#post438764

I just modify the log code on the SQLitening server and use a separate filewatcher program to monitor the SQliteningServer.log.
It is cool to see messages pop-up when people access the server or just make a sound.
Discussion of filewatcher https://forum.powerbasic.com/forum/user-to-user-discussions/programming/52280-filewatcher-discussion?t=50986
Another method might be to use SQLiteningServerMonitor.bas  (see in \src folder.)


For any lurkers, SQLitening returns error messages for the helper functions which can be automatically displayed or handled by the caller at any time.
2
Dear all,

Is-it possible to setup the error logging Callback provided by SQLite when we use SQLitening ?

More info here:

https://www.sqlite.org/errlog.html

Thanks,
Jean-Pierre
3
You've got Questions? We've got Answers! / Re: Storing a PDF-file
Last post by Fim - March 04, 2021, 05:18:26 AM
Many thanks for an exhaustive answer.
/Fim W.
4
You've got Questions? We've got Answers! / Re: Storing a PDF-file
Last post by cj - March 03, 2021, 03:58:24 PM
Yes, any file type can be insert into a blob column, but it may not be the best choice.
PDF files can be saved in a database, but client or I copy them "as is" into a folder for each client.
The client can click on them or do anything without having to save to a database and extract.
Chrome browser displays PDF files very well or SHELL "filename.pdf" to use default viewer for type "pdf".
Giving the client the option to open pdf folder allows them to select/display with a click.

#COMPILE EXE "SaveAnyFile"  'Save as "SaveAnyfile.Bas"
#INCLUDE "sqlitening.inc"
  
FUNCTION PBMAIN () AS LONG
 LOCAL sData AS STRING
 LOCAL sFileName AS STRING

 slOpen "junk.db3","C"
 slexe  "create table if not exists Table1(MyFile)"

 sFileName = "SaveAnyFile.bas"
 IF GetFileFromDisk(sFileName,sData) THEN EXIT FUNCTION
 slExeBind "insert into Table1 values(?)",slbuildbinddat(sData,"B")
 IF slGetChangeCount = 0 THEN ? "insert error":EXIT FUNCTION

 slsel "select rowid,Myfile from Table1"
 DO WHILE slGetRow
   ? CHR$("Rowid=",slfn("rowid"),$CR,$CR,slfn("MyFile"))
 LOOP
END FUNCTION

FUNCTION GetFileFromDisk(sFileName AS STRING,sData AS STRING) AS LONG
 sData = ""
 IF ISFILE(sFileName) = 0 THEN FUNCTION = 53:EXIT FUNCTION
 LOCAL hfile AS LONG
 hfile = FREEFILE
 OPEN sFileName FOR BINARY AS hFile
 IF ERR THEN FUNCTION = ERR:BEEP:EXIT FUNCTION
 GET$ hFile,LOF(hFile),sData
 IF ERR THEN FUNCTION = ERR
 CLOSE hFile
END FUNCTION
5
You've got Questions? We've got Answers! / Storing a PDF-file
Last post by Fim - March 03, 2021, 10:03:27 AM
Can a PDF file be stored in a database, if so how?
/Fim W.
6
You've got Questions? We've got Answers! / Re: Using slSetRelNamedLocks
Last post by Fim - December 30, 2020, 05:06:42 AM
Thanks for the advice and instructions. But I have decided to go another way to solve my problem, and it has gone well
7
You've got Questions? We've got Answers! / Re: Using slSetRelNamedLocks
Last post by Fim - December 17, 2020, 05:33:56 AM
How about this in SQlitening.bas
8
You've got Questions? We've got Answers! / Re: Using slSetRelNamedLocks
Last post by Fim - December 16, 2020, 01:37:31 PM
Many thanks. I should have read the manual better.
/Fim W.
9
You've got Questions? We've got Answers! / Re: Using slSetRelNamedLocks
Last post by cj - December 16, 2020, 01:15:11 PM
FUNCTION GetLockNames AS STRING
 'connect and open database before call
 LOCAL s1,s2 AS STRING, x AS LONG
 s1 = slGetStatus(1)
 IF LEN(s1) = 0 THEN EXIT FUNCTION
 REPLACE $VT WITH "," IN s1
 REPLACE $BS WITH "," IN s1
 FOR x = 2 TO PARSECOUNT(s1) STEP 8
  s2 = s2 + PARSE$(s1,x) + ","
 NEXT
 FUNCTION = LEFT$(s2,-1)
END FUNCTION
10
You've got Questions? We've got Answers! / Using slSetRelNamedLocks
Last post by Fim - December 16, 2020, 06:13:20 AM
Is there any way to find out what locks I have made with slSetRelNamedLocks?
/Fim W.
Pages1 2 3 ... 10