#1 Re: mORMot 1 » mORMot BPL Error E1025 Unsupported language feature: 'Object' » 2019-10-04 05:56:56

Problem solved.
Go to Project Options -> Delphi Compiler -> Output C/C++ and under
C/C++ output file generation select Generate DCUs only.

#2 mORMot 1 » mORMot BPL Error E1025 Unsupported language feature: 'Object' » 2019-10-04 04:15:56

xchinjo
Replies: 1

after add mORMot to bpl package and build with enable USEPACKAGES

Build error message.
How to fixed ?
Thank you.

2019-10-04-111217.png

#4 mORMot 1 » convert 16 - Execute SQL via services to lazarus Error » 2018-06-15 04:31:03

xchinjo
Replies: 2

Hi,

I convert   16 - Execute SQL via services to lazarus  Error

error message : No RTTI available for IIRemoteSQL: please define the methods using a TInterfaceFactoryGenerated wrapper

how can i fixed this problem?

#5 Re: mORMot 1 » Deploy mORMot server on IIS75+ » 2018-04-18 01:12:30

mORMot stop a few minute after start with IIS

#6 Re: mORMot 1 » Contribution: TSynRestDataset » 2018-04-10 01:16:49

when comment SynRestMidasVCL.pas 2 line  RedirectCode

constructor TSynRestDataSet.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  //RedirectCode(@TSynRestDataset.DataConvert, @TSynRestDataset.DataConvertPatch, @fDataConvertPatchBackup);
  fProvider := TDataSetProvider.Create(Self);
  fProvider.Name := 'InternalProvider';                 { Do not localize }
  fProvider.SetSubComponent(True);
  fProvider.Options := fProvider.Options+[poAllowCommandText];
  fProvider.OnUpdateError := DoOnUpdateError;
  SetProvider(fProvider);
  fDataSet := TSynRestSQLDataSet.Create(Self);
  fDataSet.Name := 'InternalDataSet';                   { Do not localize }
  fDataSet.AfterInsert := Self.DoOnAfterInsert;
  fDataSet.AfterOpen := Self.DoOnAfterOpen;
  fDataSet.SetSubComponent(True);
  fProvider.DataSet := fDataSet;
end;

destructor TSynRestDataSet.Destroy;
begin
  fDataSet.AfterInsert := nil;

  fProvider.DataSet := nil;
  FreeAndNil(fDataSet);
  FreeAndNil(fProvider);

  //RedirectCodeRestore(@TSynRestDataset.DataConvert, fDataConvertPatchBackup);

  inherited;
end;

datetime , date , time field is work fine for mORMot Commit number 1.18.3854

#7 mORMot 1 » ZeosLib Error no connection to the server » 2018-04-10 01:03:28

xchinjo
Replies: 0

EZSQLException ("SQL Error: no connection to the server").  How to zeoslib auto reconnect like firedac?

#8 Re: mORMot 1 » [Problem] Implementation conn pool in unigui ? » 2018-01-28 02:02:09

UniGui's is session based,you should create connection per session and free the connection when unused or reuse the connection to safe

#9 mORMot 1 » How to SQL Command Extract Date like yyyy/mm/dd from TModTime » 2018-01-15 08:33:37

xchinjo
Replies: 1

How to SQL Command Extract Date like yyyy/mm/dd from TModTime  and TCreateTime ? My RDBMS is MySQL.

#10 Re: mORMot 1 » ToClientDataSet not support DECIMAL Fields » 2017-08-30 04:44:00

@ab, Thank you  i will send small sample to you later.

#11 Re: mORMot 1 » ToClientDataSet not support DECIMAL Fields » 2017-08-29 12:21:38

this my function

var
  Cds:TClientDataSet;
  i:integer;
begin
  Cds:=TClientDataSet.Create(nil);
  try
    JSONToClientDataSet(cds,GetDataSet(strSQL),nil,cdsNew,false);
    Result := cds.data;
  finally
    Cds.Free;
  end;
end;

#12 Re: mORMot 1 » ToClientDataSet not support DECIMAL Fields » 2017-08-29 12:18:44

My Database Field Type is "Decimal(18,4)"

ab wrote:

Do you mean "decimal" in which context?
Our code handles sftCurrency kind of content, which holds number with fixed decimals.
If your TSQLTable has the expected type information for the columns, as input to ToClientDataSet function, there is no problem.

It is not clear what you meant here...

#14 mORMot 1 » ToClientDataSet not support DECIMAL Fields » 2017-08-29 11:52:45

xchinjo
Replies: 6

when use ToClientDataSet from mORMotMidasVCL.pas  TSQLFieldType  is not support DECIMAL fields

#15 mORMot 1 » How to mORMot Restfull Server or SOA as a Windows Service » 2017-08-10 08:24:01

xchinjo
Replies: 0

How to mORMot Restfull Server or SOA as a Windows Service , i want to start service automatic when windows start without logon.


thank you.

#16 mORMot 1 » SOA when call many time return error "Not Found" » 2017-07-02 05:55:50

xchinjo
Replies: 1

SOA when call many time return Not Found

Client:
TInterfacedObjectFakeClient.FakeCall(IRestMethods.GetRunningCode) failed: 'URI root/RestMethods.GetRunningCode ["ACCM_GL00ITM_RUNNO"] returned status 'Not Found' (404 - Network problem or request timeout)'


Server :
img

i do something wrong?

#17 Re: mORMot 1 » Contribution: TSynRestDataset » 2017-05-27 06:48:50

@EMartin, lastest your demo when change TSQLRecord (TSQLBiolife ) field

fModified:TModTime; --- to ---> fModified: TDateTime;

after rebuild all and run again your demo is error TDateTime Field.

Delphi Berlin upd1

#19 Re: mORMot 1 » Interface base service execute long time response error » 2017-04-02 15:15:25

how to enhance the timeouts on client side.
or client side can do callback function?

#20 mORMot 1 » Interface base service execute long time response error » 2017-04-02 10:56:47

xchinjo
Replies: 4

TInterfacedObjectFakeClient.FakeCall(IRemoteSQL.Execute) failed: 'URI root/RemoteSQL.Execute/4
returned status 'Invalid Request' (501 - Server not reachable or broken connection)'.

#21 mORMot 1 » lazarus buid mORMot sample 02 error » 2016-12-04 15:52:11

xchinjo
Replies: 1

error message:
/usr/bin/ld: cannot find fpc-linux64/sqlite3-64.o
/usr/bin/ld: cannot find libgcc.a


how to fixed.

thank you.

#23 Re: mORMot 1 » how to reset table id ? » 2016-10-31 09:52:42

i mean like this post
http://synopse.info/forum/viewtopic.php?id=1664

after delete all data  of table the ID already continued value. i want to reset id to start from number 1 when the table is empty
,How to flush the cache?

#24 Re: mORMot 1 » how to reset table id ? » 2016-10-30 23:29:10

i'm sorry, i mean reset to 1

#25 Re: mORMot 1 » Contribution: TSynRestDataset » 2016-10-30 12:19:54

lastest SynRestVCL and SynRestMidasVCL. when use ForceID the database insert only ID field and another fields is empty value. how to fix this problem?

this version https://drive.google.com/open?id=0B0BLh … XM1amVzdlE

when change
SynRestVCL.pas

line 733
fInsertedID := fRestClient.Add(fRec, fRec.RecordProps.FieldBitsFromCSV(fFieldNames), True);
to
fInsertedID := fRestClient.Add(fRec,True,true);

ForceID is work.

#26 mORMot 1 » how to reset table id ? » 2016-10-30 10:45:52

xchinjo
Replies: 7

how to reset table id  to 0 or any number?

#28 mORMot 1 » mORMot with BPL » 2016-09-22 16:06:43

xchinjo
Replies: 2

after add mORMot to bpl package and build
delphi error is :

---------------------------
Error
---------------------------
Cannot open file "C:\SampleBpl\SynBidirSock.pas". The system cannot find the file specified.
---------------------------
OK   
---------------------------


how to fix this problem? my mORmot is lastest  . thank you.

#29 Re: mORMot 1 » Best way to use Mormot bypass the ORM (new n-tier Delphi aplication) » 2016-08-08 00:26:47

ab wrote:

Switch to a SOA design.
Exposing all your process using mORMot interface-based services.
Defining DTO objects/records for transmission, and leaving your business objects on the server side.

It is worth taking a look at the framework documentation.
See the FAQ at http://synopse.info/files/html/Synopse% … l#TITL_123


Do you have a great example  CRUD with SOA ?
thank you.

#31 mORMot 1 » how to make mORMot scheduled jobs running » 2016-05-31 00:21:57

xchinjo
Replies: 7

how to make mORMot scheduled jobs running like cron , windows schedule , mysql event?

#32 Re: mORMot 1 » How to mORMot authenication from android » 2016-05-22 11:39:51

i think everythink is right. but atfer get with this signutl  server rerturn :

{
"errorCode":403,
"errorText":"Forbidden"
}

#33 Re: mORMot 1 » How to mORMot authenication from android » 2016-05-22 11:17:08

i modify some code all work fine until this method

       public String sessionSign(String url) {
        long Tix;
        Date  d = new Date();
        Tix = d.getTime();
        if(lastSessionTickCount == Tix)
            Tix += 1;

        lastSessionTickCount = Tix;

        String aNonce = Long.toHexString(Tix);

        while(aNonce.length() < 8)
            aNonce = '0' +aNonce;
        if (aNonce.length() > 8)
            aNonce = aNonce.substring(aNonce.length() - 8, aNonce.length());

        String ss = Long.toHexString(getCRC32(url,
                getCRC32(aNonce, sessionPrivateKey)));

        while(ss.length() < 8) { ss = '0'+ss; }

        String s = url.indexOf("?") == -1 ? url+ "?session_signature=" : url+ "&session_signature=";
        System.out.println("## sessionIDHexa8="+sessionIDHexa8+" ,aNonce="+aNonce+" ,ss="+ss+" ,s="+s);
        return s + sessionIDHexa8 + aNonce + ss;
    }

i am not understand 2 variable (aNonce,ss)   , the value of aNonce,ss not same javascript at below  , sessionIDHexa8  is same as javascripts

        Client.prototype.signUrl = function (url) {
            if (Client._instance.loggedIn === true) {
              
                var Tix, Nonce, s, ss, d = new Date();
                Tix = d.getTime() - Client._instance.SessionTickCountOffset;
                Nonce = Tix.toString(16);
                
                while (Nonce.length < 8) {
                    Nonce = '0' + Nonce;
                }
                if (Nonce.length > 8) {
                    Nonce = Nonce.slice(Nonce.length - 8);
                }
                ss = Client._instance.crc32(url, Client._instance.crc32(Nonce, Client._instance.SessionPrivateKey)).toString(16);
                while (ss.length < 8) {
                    ss = '0' + ss;
                }
                s = url.indexOf("?") === -1 ? url + '?session_signature=' : url + '&session_signature=';

                console.log("SessionIDHexa8="+Client._instance.SessionIDHexa8+" , Nonce="+Nonce+" ,ss= "+ss+" ,s="+s);

                return s + Client._instance.SessionIDHexa8 + Nonce + ss;
            } else {
                return url;
            }
        };

#36 mORMot 1 » How to mORMot authenication from android » 2016-05-21 05:55:22

xchinjo
Replies: 7

How to mORMot authenication from android  please sample to me

i found this
http://synopse.info/forum/viewtopic.php … 515#p12515

but i am not javascript expert , i can not convert to java


thank you.

#38 mORMot 1 » How to mORMot reconnect after mysql server gone away » 2016-05-08 01:21:03

xchinjo
Replies: 2

How to mORMot reconnect after mysql server gone away

#39 Re: mORMot 1 » Error SQLITE_ERROR when change PostgreSQL to Mysql in Sample 28 » 2016-05-01 04:17:57

When change from FireDAC to ZEOS  every think work fine.
What difference?

#40 Re: mORMot 1 » Error SQLITE_ERROR when change PostgreSQL to Mysql in Sample 28 » 2016-05-01 02:34:36

What is wrong?

begin
  // set logging abilities
  SQLite3Log.Family.Level := LOG_VERBOSE;
  //SQLite3Log.Family.EchoToConsole := LOG_VERBOSE;
  SQLite3Log.Family.PerThreadLog := ptIdentifiedInOnFile;
  // ODBC driver e.g. from http://ftp.postgresql.org/pub/odbc/versions/msi

  //aProps := TODBCConnectionProperties.Create('','Driver=PostgreSQL Unicode'+
  //    {$ifdef CPU64}'(x64)'+{$endif}';Database=postgres;'+
  //    'Server=localhost;Port=5433;UID=postgres;Pwd=postgresPassword','','');




    FDPhysMySQLDriverLink := TFDPhysMySQLDriverLink.Create(Nil);
    aProps := TSQLDBFireDACConnectionProperties.Create('MySQL?Server='+_SERVERIP,_DBNAME,_DBUSRNAME,_DBPASSWD);
   // aProps.ForcedSchemaName := 'sam';
  try
    // get the shared data model
    aModel := DataModel;
    VirtualTableExternalRegisterAll(aModel, aProps, false);


    try
      // create the main mORMot server
      aRestServer := TSQLRestServerDB.Create(aModel,SQLITE_MEMORY_DATABASE_NAME,false); // authentication=false

      try
        // create tables or fields if missing
       aRestServer.CreateMissingTables;

        // serve aRestServer data over HTTP
        aHttpServer := TSQLHttpServer.Create(SERVER_PORT,[aRestServer],'+',useHttpApiRegisteringURI);
        try
          aHttpServer.AccessControlAllowOrigin := '*'; // allow cross-site AJAX queries
          writeln('Background server is running.'#10);
          write('Press [Enter] to close the server.');
          readln;
        finally
          aHttpServer.Free;
        end;
      finally
        aRestServer.Free;
      end;
    finally
      aModel.Free;
    end;
  finally
    aProps.Free;
  end;
end.

#41 mORMot 1 » Error SQLITE_ERROR when change PostgreSQL to Mysql in Sample 28 » 2016-04-30 10:17:30

xchinjo
Replies: 3

aProps := TODBCConnectionProperties.Create('','Driver=PostgreSQL Unicode'+
      {$ifdef CPU64}'(x64)'+{$endif}';Database=postgres;'+
      'Server=localhost;Port=5433;UID=postgres;Pwd=postgresPassword','','');

change to


    FDPhysMySQLDriverLink := TFDPhysMySQLDriverLink.Create(Nil);
    aProps := TSQLDBFireDACConnectionProperties.Create('MySQL?Server='+_SERVERIP,_DBNAME,_DBUSRNAME,_DBPASSWD);

after run the error is :
---------------------------
ESQLite3Exception with message 'Error SQLITE_ERROR (1) [INSERT INTO Person (Name) VALUES (?);] using 3.11.1 - no such table: Person, extended_errcode=1'.

please help me

thank you.

Board footer

Powered by FluxBB