You can download the Open Source version of the framework in the file SynopseSQLite3.zip
Here are some highlights of the modifications:
- disconnect piped name client after 30 min of inactivity
to free the corresponding thread resource if the client failed to close
cleanly
- some small fixes (e.g. integer to and from string
conversion, GPF) and multi-compiler (Delphi 2009/2010, especialy with
TypInfo define) compatibility
- compiler conditional renamed ENHANCEDRTL instead of
ENHANCEDTRTL
- new TSQLTable.GetRowValues overloaded methods
- TService debug and enhancements
- allow backup directly into a custom file (not only a
custom directory)
- on-the-fly Restore of the database from a compressed
backup file
If you are curious, don't forget to take a look at the included SynZip and SynCrypto units. I think you'll find the fastest Zip compression and AES/SHA/MD5 units for Delphi.
The SynCrtSock unit itself is a light but powerful replacement for Indy or Synapse. It does not depend on the SQLite3 framework. Just want to send an email or get a file from HTTP in pure Delphi code? Here is the place!
8 reactions
1 From Leo - 23/01/2010, 04:33
I got "EInvalidPointer with message 'Invalid pointer operation'":
var
s, d: TMemoryStream;
t: Cardinal;
begin
s := TMemoryStream.Create;
d := TMemoryStream.Create;
try
s.LoadFromFile('D:\ListView.db3');
s.Position := 0;
memo1.Lines.Add('Source Size:' + IntToStr(s.Size));
t := GetTickCount;
SynZip.CompressStream(s.Memory, s.Size, d);
Memo1.Lines.Add('Compress Time: ' + IntToStr(GetTickCount - t));
d.Position := 0;
Memo1.Lines.Add('Dest Size:' + IntToStr(d.Size));
d.SaveToFile('D:\ListView.zip');
finally
d.Free;
s.Free;
end;
end;
2 From Leo - 23/01/2010, 06:02
Hello Bouchez,
I record a video:
http://www.esnips.com/doc/e8e26939-...
compile with D2007
3 From A. Bouchez - 23/01/2010, 10:40
About Synzip, there was a bug!
function CompressStream(src: pointer; srcLen: integer;
.....
finally
deflateEnd(strm); // instead of INFLATEEND, of course!
end;
4 From A. Bouchez - 23/01/2010, 11:34
Thanks about the video, that's a GREAT mean of sharing and debuging!
1. about the ambiguous Pos(), it didn't appear with my version of Delphi 2007 nor Delphi 2009. Just put an {$ifdef UNICODE} ... {$endif} around this Pos() definition and implementation (it's still needed for proper Delphi 2009/2010 to compile, I think).
2. in TTextWriter.Add(Format: PUTF8Char...) the chars in the case Format^ are some Win-Ansi (codepage 1252) chars > #127... it seems that your IDE configuration did convert the SQLite3Commons.pas source file into your proper codepage, resulting into MBSC invalid chars (?)... I've modified the source code in order to proper compile with non Win-Ansi codepage on the IDE. Also in the NormToUpper[] initialization procedure. Please confirm it's OK.
3. don't play with conditional, unless you know what you are doing:
- LVCL is to be defined globaly in your application, if your use our LVCL (with its proper System.dcu and SysInit.dcu)
- ENHANCEDRTL is to be defined globaly in your application, if your use our Enhanced Run Time Library (with its proper System.dcu and SysInit.dcu)
It's better not touching it, unless you know exactly what you are doing.
For Delphi 2009/2010, the UNICODE conditional is tested in order to adapt to the incompatibilities of this new compilers.
I've uploaded the corrected version (1.3.1). in the same download link as above. In all case, thanks for your interest and video report!
5 From Alin Sfetcu - 23/01/2010, 18:34
i have read everything about this framework that i could find on this site, but i still have no idea how to use it. Can you provide a sample application ?
6 From A. Bouchez - 23/01/2010, 18:43
Yes tomorrow I'll post one.
The database access with such a Client/Server framework is something totally different than with "normal" component-driven database. The framework is code-driven, not component-driven. That is the most difficult to find out, and why samples are a need.
7 From Alin - 23/01/2010, 19:37
That`s great, i`m looking forward to this.
8 From A.Bouchez - 21/06/2010, 11:08