#1 Re: mORMot 1 » ICU extension for SQLite » 2024-09-14 06:44:44

Well, I just can't call the function sqlite3.db_config(sql.DB, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION,1);
under Delphi Win64. There is an access violation directly in the sqlite library.
Both in the static version and in the DLL. I can't provide a more detailed analysis because I can't debug sqlite.

It works with Delphi Win32. But the extension is only Win64.

(I have tested the extension with DiSQLite3, there they works)

#3 Re: mORMot 1 » ICU extension for SQLite » 2024-08-13 14:17:20

ab wrote:

Please define "code crash".

---------------------------
GExperts Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EAccessViolation with message 'Access violation at address 0000000000D1EE5F. Read of address FFFFFFFFFFFFFFFF'.
---------------------------
[&Filter ...] [Ignore &All this Session] [&Break] [Additional &Info] [&Continue]
---------------------------
ThreadId=24592
ProcessId=1
ThreadName="Main"
ExceptionMessage="Access violation at address 0000000000D1EE5F. Read of address FFFFFFFFFFFFFFFF"
ExceptionName="EAccessViolation"
ExceptionDisplayName="$C0000005"
ExceptionAddress=00D1EE5F
FileName=<not available>
LineNumber=<not available>

---------------------------

#4 Re: mORMot 1 » ICU extension for SQLite » 2024-08-13 14:00:07

i have downloaded

https://github.com/asg017/sqlite-vec/re … _64.tar.gz

created a win64 vcl application

and

uses
  ...
  ,mormot.core.os,mormot.db.sql,mormot.db.raw.sqlite3,mormot.core.unicode
  ,mormot.core.base,mormot.db.raw.sqlite3.static,mormot.db.sql.sqlite3
  ,mormot.db.core,mormot.core.datetime

procedure TForm1.FormCreate(Sender: TObject);
var
  sql : TSQLDatabase;
  lLoad : Integer;
  lMsg : PUtf8Char;
begin
  sql := TSQLDatabase.Create(ExtractFilePath(Application.ExeName)+'sample.sql','');
  try
    sqlite3.db_config(sql.DB, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1);
    lLoad:= sql.SQLite3Library.load_extension(sql.DB, PUtf8Char(ExtractFilePath(Application.ExeName)+'vec0.dll'), 0, lMsg);
    if not (lLoad= SQLITE_OK) then
      raise Exception.Create('Error Message');
    sql.Free;
  except
    on E:Exception do
      begin
      end;
  end;

end;

code crash at sqlite3.db_config(....

#5 Re: mORMot 1 » ICU extension for SQLite » 2024-08-13 07:38:13

Somehow none of it works. Or it doesn't work with my extension. Does anyone know more about this? I want to download the following extension.

https://github.com/asg017/sqlite-vec/re … .2-alpha.6

Can anyone help?

#6 Re: PDF Engine » SynPDF and PDF/3-A standard » 2023-11-01 09:57:19

ab wrote:

Any help is welcome to follow PDF/3-A support.

What help is needed? What is still to be done?

#7 Re: mORMot 1 » Embed SQLite C object files into application » 2018-08-16 08:46:48

with wxsqlite it works smile but i need a DB Explorer

Thanks

#8 Re: mORMot 1 » Embed SQLite C object files into application » 2018-08-16 07:09:22

i need encryption in Delphi Win64, so i need the external DLL.

#9 Re: mORMot 1 » Embed SQLite C object files into application » 2018-08-15 13:01:48

For the 64bit variant I have to take the SQLite DLL from https://github.com/utelle/wxsqlite3/releases, right?

Is there a database viewer that supports this encryption?

#10 Re: Other components » Hyphenation in Delphi » 2017-10-25 12:19:25

Is it included in main repository?

#11 Re: mORMot 1 » How to save a File to MongoDB with mORMot Framework? » 2016-02-17 17:43:31

thank you @ab, for your explanations. I would have to check that again. But I think we exceed the 16 MB limit also not. And the files are rarely changed.

#12 Re: mORMot 1 » How to save a File to MongoDB with mORMot Framework? » 2016-02-17 07:30:51

What are the difficults to support GridFS? Aside from that, who programmed it.

#13 Re: SyNode » Adding JavaScript support for mORMot framework » 2015-10-07 07:50:44

Any news on this project? Win64 Support,...Does it make sense to update to the latest version of SpiderMonkey?

#15 Re: mORMot 1 » Can't obtain Blob from SQLite » 2015-09-18 13:18:23

according to my first post,

This code should work, but it does not.
Can someone take a look on this, please.
thanks

var
  sql : TSQLDatabase;
  blob : TSQLBlobStream;
  memory : TMemoryStream;
begin
  sql := TSQLDatabase.Create('d:\temp\test.db');
  try                
     sql.Execute('CREATE TABLE IF NOT EXISTS "files" ("UID"    INTEGER PRIMARY KEY AUTOINCREMENT, "Filename"    TEXT NOT NULL, "File"    BLOB);');
    memory := TMemoryStream.Create;
    memory.LoadFromFile('d:\temp\v\DOCUMENT_2013-20280_2013_05_14_11_14_31.XML');
    memory.Position := 0;
  
    sql.Execute('INSERT INTO files (Filename) VALUES ("'+StringToUTF8('DOCUMENT_2013-20280_2013_05_14_11_14_31.XML')+'")');
    blob := sql.Blob('main','files','File',0,true);     <------------ cannot open value of type null extended_errcode=1
    blob.CopyFrom(memory,memory.Size);
    memory.Free;
    blob.Free;
  finally
    sql.Destroy;
  end;

#16 Re: mORMot 1 » Can't obtain Blob from SQLite » 2015-09-18 07:29:34

ab wrote:

Your path is not correct.
Try 'd:\temp\test.db' instead of 'test.db'.

dosn't work.

https://www.sqlite.org/c3ref/blob_open.html say the dbname is called 'main', but it also does not work


ab wrote:

But why do you use sql.Blob() ?
Use a regular SELECT statement with ColumnBlob() on the TSQLDatabase.
It would be much faster and safer.

sorry, i can't find some example or documentation to read / write binary blobs

#17 mORMot 1 » Can't obtain Blob from SQLite » 2015-09-17 21:51:06

sh17
Replies: 6

Can't obtain Blob direct from SQLite

Which DBName is correct?

var
  sql : TSQLDatabase;
  blob : TSQLBlobStream;
  memory : TMemoryStream;
begin
  sql := TSQLDatabase.Create('d:\temp\test.db');
  try               
     sql.Execute('CREATE TABLE IF NOT EXISTS "files" ("UID"    INTEGER PRIMARY KEY AUTOINCREMENT, "Filename"    TEXT NOT NULL, "File"    BLOB);');

    memory := TMemoryStream.Create;
    memory.LoadFromFile('d:\temp\v\DOCUMENT_2013-20280_2013_05_14_11_14_31.XML');
    memory.Position := 0;
 
    sql.Execute('INSERT INTO files (Filename) VALUES ("'+UTF8Encode('DOCUMENT_2013-20280_2013_05_14_11_14_31.XML')+'")');
    blob := sql.Blob('test.db','files','File',0,true);     <------------ no such table test.db.files extended_errcode=1
    blob.CopyFrom(memory,memory.Size);
    memory.Free;
    blob.Free;
  finally
    sql.Destroy;
  end;

#19 Re: PDF Engine » XMP Support » 2014-06-24 05:25:40

ab wrote:

Any contribution is welcome!
:-)

i do my best.

I have to look also for PDF/A-3 support.

#20 PDF Engine » XMP Support » 2014-06-23 08:14:52

sh17
Replies: 3

Could it be difficult to integrate the full XMP support?

http://en.wikipedia.org/wiki/Extensible … a_Platform

Board footer

Powered by FluxBB