#1 Re: mORMot 2 » Transfer binary files from HTTP Rest server » 2023-03-25 11:22:05

This means that I can use the StringFromFile function and transfer the binary file as a RawByteString without any worries

#3 mORMot 2 » Transfer binary files from HTTP Rest server » 2023-03-24 18:39:02

Daniel_Andrascik
Replies: 3

Hello

I am newbie in REST servers and HTTP protocol.

I use TRestServerFullMemory a TRestHttpClient in WEBSOCKETS_DEFAULT_MODE. From time to time I would also need to transfer a binary file with a size from 10MB to 50MB. What is the best option for a Rest server like this? It is reasonable? I would prefer to use http communication and an allowed port (customer security policy).

Best regards

#4 Re: mORMot 1 » ISqlDBStatement and ISQLDBRows in SQLite » 2021-12-16 22:48:48

Egh, sorry. I didn't notice that TSqlDBSQLite3Statement is a descendant of TSqlDBStatement whitch implements ISqlDBStatement and ISQLDBRows interfaces.

#5 mORMot 1 » ISqlDBStatement and ISQLDBRows in SQLite » 2021-12-16 01:14:16

Daniel_Andrascik
Replies: 2

Hello.

It is possible to use these "low level access" interfaces (ISqlDBStatement and ISQLDBRows) to access to the SQLite database? So far, I have used these interfaces (ISqlDBStatement and ISQLDBRows) to access MSSQL (OleDB). Now i'm a little confused, because i wanted to use the same concept to SQLite but i'm wandering while studying your library. I only found the only TSqlDataBase access, but this is little bit another concept. (mORMot2)

Best regards...

#7 mORMot 1 » TSqlDBOleDBStatement - get RawColumnTypes (mORMot2) » 2021-10-15 22:23:23

Daniel_Andrascik
Replies: 2

Hello

I use yours MSSQL OLE DB driver. Only driver i.e. ISqlDBRows and ISqlDBStatement, not ORM. But sometimes I need to get raw MS SQL column types. I parsed your code until late at night and i created the following function (i still have a little headache from it):

type
  TSqlDBOleDBStatementHack = class(TSqlDBOleDBStatement);
  TSqlDBOleDBConnectionHack = class(TSqlDBOleDBConnection);

function TmORMotOLEDBBaseAdapter.GetRawColTypes(const aRS: ISqlDBRows): TArray<WORD>;
var
  DBStat: TSqlDBStatement;
  DBOLEStat: TSqlDBOleDBStatementHack;
  Conn: TSqlDBConnection;
  Cols, nfo: PDBColumnInfo;
  nCols: PtrUInt;
  ColsNames: PWideChar;
  i: Integer;
begin
  DBStat := aRS.Instance;
  if DBStat is TSqlDBOleDBStatement then
  begin
    SetLength(Result,aRS.ColumnCount);
    DBOLEStat := TSqlDBOleDBStatementHack(TSqlDBOleDBStatement(DBStat));
    TSqlDBOleDBConnectionHack(DBOLEStat.OleDBConnection).OleDBCheck(DBStat,(DBOLEStat.fRowSet as IColumnsInfo).GetColumnInfo(nCols, Cols, ColsNames));
    try
      nfo := Cols;
      for i := 1 to nCols do
      begin
        Result[i-1] := nfo^.wType;
        inc(nfo);
      end;
    finally
      TSqlDBOleDBConnectionHack(DBOLEStat.OleDBConnection).fMalloc.Free(Cols);
      TSqlDBOleDBConnectionHack(DBOLEStat.OleDBConnection).fMalloc.Free(ColsNames);
    end;
  end;
end;

This is the right and best way to achieve the right result?

Daniel Andrascik

#9 Low level and performance » SynZip - standalone minimal units » 2013-07-11 12:56:33

Daniel_Andrascik
Replies: 2

Hello.

Sorry for my poor English.

I try extract only SynZip functionality from your great mORMot framework. Only for Zip/Unzip purpose is neded these units:

- Synopse.inc
- SynCommons.pas
- SynLZ.pas
- SynZip.pas
- SynZipFiles.pas
- deflate.obj, tree.obj
- SynCrypto.pas

But i think that SynCrypto is not needed now. If i remove SynCrypto from SynZipFiles ewerything seems work done.

Board footer

Powered by FluxBB