#102 Re: mORMot 1 » 'ExecuteFromJSON: Invalid Types[3]=0' for TDateTime with MSSQL » 2014-03-09 14:49:25

Good work ab.

Now I've string truncation exception.
After investigations I found that one field declared as 'RawUTF8 Index 35' takes more than 35 chars ! Why mORMot doesn't truncate strings ?

Thanks for your great work.

#103 mORMot 1 » 'ExecuteFromJSON: Invalid Types[3]=0' for TDateTime with MSSQL » 2014-03-09 08:16:47

tech
Replies: 4

Hi all,

I've mapped an existing mssql table that contains a 'smalldatetime' field with a TDateTime one on delphi, but I receive the exception above when I want to update the virtual table.
The exception occurs on this function when mormot can't find the appropriate field type on the TSQLDBFieldType :

 TSQLRestServerStaticExternal.ExecuteFromJSON(const SentData: RawUTF8; Occasion: TSQLOccasion; UpdatedID: integer): integer; 

The connection is established with TOleDBMSSQL2008ConnectionProperties for MSSQL2008 and I can't modify RDBMS structure.

Thnx.

#104 Re: mORMot 1 » Unregister virtual table » 2014-03-07 15:10:39

Thx Arnaud, it works perfectly.

#105 Re: mORMot 1 » Unregister virtual table » 2014-03-07 12:12:26

I've found the fillfrom() method but it doesn't copy all fields. This code copy records with empty fields :

var myRec : TSQLmyClass;
    sqlRec: TSQLClass;
  Results: TIntegerDynArray;
begin
  try
        myRec := TSQLmyClass.CreateAndFillPrepare(globalClient, '');
        sqlRec:= TSQLClass.Create;
        if globalClient.TransactionBeginRetry(TSQLClass, 20) then
        try
          globalClient.BatchStart(TSQLClass);
          while myRec.FillOne do
          begin
            sqlRec.FillFrom(myRec);
            globalClient.BatchAdd(sqlRec, true);
          end;
          globalClient.BatchSend(Results);
          globalClient.Commit();
        except
          globalClient.RollBack();
        end;
      finally
        myRec .Free;
        sqlRec.Free;
      end;
end;

#106 Re: mORMot 1 » Unregister virtual table » 2014-03-07 10:39:19

Ok, I've created a sub-class named TSQLMyClass derived from TSQLClass that have external table but i dont know how to pump data from the sub-class into the mother one !

#107 mORMot 1 » Unregister virtual table » 2014-03-07 09:37:59

tech
Replies: 5

Hi all,

I've to load data from a mysql external table and make some changes in the sqlite3 (without impacting mysql one) and finally to put records on an other MSSql external table. Is there a possibilty to unregister mysql table just after pumping data and to continue work only with sqlite3 ?

Thx.

#109 Re: mORMot 1 » Integer and Boolean as NUMERIC (18, 0) on FireBird with Zeos 7.1.2 » 2014-01-16 21:16:30

Ok for the int64 values.
I did not use The 7.2 because it is an alpha version, i'll test it later.
Which is the best driver for firebird under mormot between zeos and syndbfirebird?

Thx.

#110 mORMot 1 » Integer and Boolean as NUMERIC (18, 0) on FireBird with Zeos 7.1.2 » 2014-01-16 12:11:25

tech
Replies: 4

Hello,

I've tested the use of virtualTables with Zeos 7.1.2 to Firebird and it works, but integers and booleans are created as NUMERIC(18, 0) instead of INTEGER.
Do I missed some things to do ?

Thx,

Win8, D7, Firebird 2.5 via Zeos 7.1.2

Board footer

Powered by FluxBB