PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4]

Author Topic: SQLite Client Server Source  (Read 2978 times)

Richard Kelly

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 318
Re: SQLite Client Server Source
« Reply #45 on: June 19, 2017, 12:57:37 PM »

I went ahead and added encryption/decryption to the spooler class and updated the cCTSQLite_Script.txt to demonstrate/test. It only took about a dozen lines of code and now everything going back and forth between the client and server classes is encrypted.

Attachment updated.

Rick
Logged

Richard Kelly

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 318
Re: SQLite Client Server Source
« Reply #46 on: June 19, 2017, 04:50:24 PM »

Recalling Paul's comments about keeping things simple, I'm looking to wrap things up in a straightforward way.

1. Adding functions to get, add, and release SQLite DB connection handles. You'll be responsible for opening connections.
2. Adding functions supporting database backups.
3. Adding a messaging subsystem of sorts fed to the main message pump window.
4. Adding functions for transmit and receive of spooler results files.
5. Adding functions for querying/updating database


Common Message UDT

Code: [Select]
Type SQLITE_LOG

   LocalTime   as SystemTime
   Event       as uShort
   Severity    as uShort
   IPAddress   as String
   ErrorCode   as Long
   Message     as String
   
END TYPE

The mail message pump will receive one of the following five messages. SQLITE_USER_MESSAGE is user generated, the others are created and posted by the server class.

Code: [Select]
Private Const SQLITE_SERVER_UDP_BROADCAST   = WM_USER + 1000
Private Const SQLITE_SERVER_TCP_CONNECT     = WM_USER + 1001
Private Const SQLITE_SQL_ERROR_LOG          = WM_USER + 1002
Private Const SQLITE_SQL_TRACE              = WM_USER + 1003
Private Const SQLITE_USER_MESSAGE           = WM_USER + 1004


Private Const SQLITE_SEVERITY_INFO          = 1
Private Const SQLITE_SEVERITY_WARNING       = 2
Private Const SQLITE_SEVERITY_FAILURE       = 3

The sequence and format of messages is left to the developer and can be whatever is needed. When a client connects, the server and client classes will authenticate and then the server will sit on a TCP receive waiting for marching orders.

Rick
Logged

Richard Kelly

  • FireFly3 Registered User
  • Senior FireFly Member
  • *
  • Posts: 318
Re: SQLite Client Server Source
« Reply #47 on: July 05, 2017, 03:31:52 AM »

The basic server messaging framework has been added. It will continue to be fleshed out and shows you how the server class posts notifications of events. Although I am just pumping things out to the console window, in a gui server implementation, you could use a listview and color/icons for warnings and failure events.

Attachment in first message updated.

Rick
« Last Edit: July 05, 2017, 11:17:24 AM by Richard Kelly »
Logged

Paul Squires

  • Administrator
  • Master FireFly Member
  • *****
  • Posts: 8099
  • Windows 10
    • PlanetSquires Software
Re: SQLite Client Server Source
« Reply #48 on: August 03, 2017, 07:54:55 PM »

Hi Rick, just curious if you're still chugging along with this project? It shows a lot of promise. I see that the GitHub has not been updated in a while:  https://github.com/breacsealgaire/FreeBasic-32-64-Windows-SQLite-Class

Along with Jim's grid and print preview code, a great FB sourced sqlite client/server would certainly help round out the tool belt.
Logged
Paul Squires
PlanetSquires Software
FireFly Visual Designer, WinFBE Editor
Pages: 1 2 3 [4]