SQLite Windows Class
SQLite Windows Class
Sharing the SQLite class I use for WIndows. Tested with 100 threads pulling 46K rows each on bit 32 and 64 bit compiles using the default 1MB stack.
https://github.com/breacsealgaire/FreeB ... Lite-Class
Added SQLite connection pool class and example. Useful for multi threaded access.
https://github.com/breacsealgaire/FreeB ... Lite-Class
Added SQLite connection pool class and example. Useful for multi threaded access.
Last edited by rpkelly on May 14, 2017 16:38, edited 2 times in total.
-
- Posts: 2958
- Joined: Jun 02, 2015 16:24
Re: SQLite Windows Class
Hi rpkelly, thanks for this. Have you a small example to get started with your lib?
Re: SQLite Windows Class
There is a sample script cCTSSQLite_Script_txt on Git. One thing to be aware of is that the library was designed to support both a standalone client and a client server design. The spooler class when returning the results provides a file handle with the file pointer at the beginning and the file size so a server can begin to read and send via TCP. For a standalone client, one additional spooler call to function EndSpoolStreamFile that sets the file pointer to the first result block is needed and shown in the sample test script.Tourist Trap wrote:Hi rpkelly, thanks for this. Have you a small example to get started with your lib?
Re: SQLite Windows Class
Added Windows crypto class useful for SQLite client/server authentication with example of one way to design a handshake.
Re: SQLite Windows Class
This SQLite Windows collection is the beginning of a complete set of classes for a client/server group. Over the next several months, there are basically three additional classes. Socket (already in place with preliminary testing), Client, and, Server classes after which all the tools will be in place. The developer will build the GUI part of the server and use a message only window for communication with the server class which will provide the supporting functions for handshake, SQLite database and sending the results. The server class will be designed around one TCP listening port and one UDP listening port. The UDP port is used as a server discovery.
Re: SQLite Windows Class
Added a thread pool class that the server class will eventually use.
https://github.com/breacsealgaire/FreeB ... Lite-Class
https://github.com/breacsealgaire/FreeB ... Lite-Class
Re: SQLite Windows Class
Wow, this is Great! One of the most useful projects to appear on FB. I'll definitely be using this. Thanks so much.
Re: SQLite Windows Class
Greetings!rpkelly wrote: ↑May 27, 2017 0:14 Added a thread pool class that the server class will eventually use.
https://github.com/breacsealgaire/FreeB ... Lite-Class
I am trying to learn this class wrapper and managed to get the script text file(renamed to *.bas) compiled and ran,except the cCTSQLite_Script one regarding the Clear function in cCTSQLLiteCrypto.bi:
Code: Select all
Private Function cCTSQLLiteCrypto.DecryptText (ByRef sCipherText as String, _
ByRef sPlainText as String, _
ByVal iEncryptIndex1 as Long, _
ByVal iEncryptIndex2 as Long) as BOOLEAN
Dim lStatus as BOOLEAN
Dim Key as BCRYPT_KEY_HANDLE
Dim sIV as String
Dim sKey as String
Dim sKeyHash as String
''''..........................
Clear(StrPtr(sKey),Len(sKey),0)
Clear(StrPtr(sIV),Len(sIV),0)
Code: Select all
E:\Learning\FreeBasic\code\FreeBasic-32-64-Windows-SQLite-Class-master\cCTSQL\cCTSQLLiteCrypto.bi(205) error 181: Invalid assignment/conversion, at parameter 1 of CLEAR() in 'Clear(StrPtr(sKey),Len(sKey),0)'
E:\Learning\FreeBasic\code\FreeBasic-32-64-Windows-SQLite-Class-master\cCTSQL\cCTSQLLiteCrypto.bi(206) error 181: Invalid assignment/conversion, at parameter 1 of CLEAR() in 'Clear(StrPtr(sIV),Len(sIV),0)'
Code: Select all
Clear
Clears or initializes some memory
Syntax
Declare Sub Clear cdecl ( ByRef dst As Any, ByVal value As Long = 0, ByVal bytes As UInteger )
Usage
Clear( dst, [value], bytes )
Parameters
dst
starting address of some memory
value
the value to set all bytes equal to
bytes
number of bytes to clear
Code: Select all
Clear(StrPtr(sKey),0,Len(sKey))
Clear(StrPtr(sIV),0,Len(sIV))
BTW, in cctSqlite.bi I find this:
Code: Select all
#Include Once "windows.bi"
Any help on this would be appreciated.
Re: SQLite Windows Class
Try with clear (*strptr(skey).....
If windows.bi is used it should be only for Windows.
If windows.bi is used it should be only for Windows.