#1 Re: mORMot 1 » at interface based service Client side access violation error » 2022-10-18 10:43:29

Thanks AB for your great support. I find that I didn't assign nil to child object of Client. sad

#2 Re: mORMot 1 » at interface based service Client side access violation error » 2022-10-17 11:01:07

How can I interface variable properly released before assignment correctly?

#4 mORMot 1 » at interface based service Client side access violation error » 2022-10-17 10:13:01

zekeriye
Replies: 5

hi;

Firstly, sorry for my bad english and this long post
I am newbie delphi and mormot.
I am playing some sample app with mormot.
I make some minor modification Samples\ThirdPartyDemos\George\REST-tester  app.
My app is interfacebased and  I have got many interfacebased functions over than 130.
So I made same change server and client side for this functions I make sections (make groups) over this functions.
For example; Customer, Bank, Crm etc.

HttpServer/Client start without any authentication (using http_Socket)
All of Server functions working with tested using Postman (http:/localhost:9031/...Methods/Function_name)
I haven't got any error at the server side.
in the client VCL program (At the Client side) sometimes has got error access violation at line
   TSQLRestClientURI.Services.Resolve(I...Methods, ...Methods);

Changed server section to working multiple TSQLRestServer with TServiceFactoryServer
like this 

https://gist.github.com/zbozkurt/413bcc … 5ff71b7d98


Can any body help me to solve this problem?

#5 mORMot 1 » check parameters rules before processing at the service based app » 2021-01-04 20:32:30

zekeriye
Replies: 3

Hi;

I newbie mormot and dephi.
I try to make a service based application.
I neeed to check parameters type and rules before processing
if parameters type is not compactible type send to client some error message instead of 406
if parameters check is pass process requested function?

for example ;

type
  TServiceCalculator = class(TInterfacedObject, ICalculator)
  public
    function Add(n1,n2: integer): integer;
  end;

function TServiceCalculator.Add(n1, n2: integer): integer;
begin
  result := n1+n2;
end;

if a client call add function with string type I want to return to client some text about error.
  But a clent call add function with integer params execute add function and function return result.

How can I do this. Does any body have any idea to solve this problem ?

thanks for all.

#6 Re: mORMot 1 » Which methods usefull for converting record to JSON » 2020-06-13 12:17:20

Hi;

This project is coding with XE7.
Connection using via zeosDB components other all codes.
Because project will running as a windows service.
Only Clients has got a gui mobile, Windows Desktop App or Web Browser.

#7 mORMot 1 » Which methods usefull for converting record to JSON » 2020-06-13 10:41:24

zekeriye
Replies: 3

Hi;

Firstly thanks to Arnaud and other contributors of mormot framework. It is a greate and very nice framework.

I will make an integration system to another program so I deciced to make of this using with http basic Rest interface based service.

I started with point an example (Samples\ThirdPartyDemos\George\REST-tester).

But I need to retrive and send some records to client. I used connecting the server ZeosDBO.
Zeosbo Query component is enought for retriving data from Sql Server

Which methods or function usefull  I can use for converting JSON and sending  record/records to clients?


PS: Sory for my bad and poor english.

#8 Re: mORMot 1 » DateTime Convert Error TSynDBSQLDataSet » 2017-07-26 10:00:48

Thanks your great support ab;

Now; version 25-07-2017 reading correct datetime value from MSSQL 2008 R2 database.
this version solve ".. is not datetime value" error message.

#9 Re: mORMot 1 » DateTime and Currency for GetFieldData in TSynVirtualDataSet » 2017-07-26 09:59:11

Thanks your great support ab;

Now; version 25-07-2017 reading correct datetime value from MSSQL 2008 R2 database.
this version solve ".. is not datetime value" error message.

#10 Re: mORMot 1 » DateTime Convert Error TSynDBSQLDataSet » 2017-07-18 08:39:26

I want to reading a list (some of records from table) and display them to show in a stringgrid.
Does any advice to solve this problem
or
another methods to reading, showing datetime correct value ?

#11 mORMot 1 » DateTime Convert Error TSynDBSQLDataSet » 2017-07-17 10:24:02

zekeriye
Replies: 2

Hi;

I am new bee mormot and delphi.
When I was reading a datetime value from MSSQL 2008 R2 database ;
I have got an error
   " ... 0.42936 is not valid timestamp"

But WhenI was execute same SQL statement via SME I saw the datetime value is "2017-07-16 00:00:00"
I am using this code blok like this: (I am verry sorry for big capital . But I am using big capital when I was writing code.)

   XQSIPLIST : TSynDBSQLDataSet;
   XLIST : TSTRINGLIST;
   ..
   XSQLSTR:='Select INCKEYNO, TARIH, NAME from MYtable';
   XQSIPLIST:=TSynDBSQLDataSet.CREATE(nil);
   XQSIPLIST.CONNECTION:=mssqldbConnetion; // TSQLDBConnectionProperties . Connect via MSSQL 2008 R2 Client
   XQSIPLIST.COMMANDTEXT:=XSQLSTR;
   XQSIPLIST.OPEN;
   XQSIPLIST.FIRST;

   WHILE NOT XQSIPLIST.EOF DO BEGIN
      ..
      XLIST.ITEMS[XROW]:=DATETOSTR(XQSIPLIST.FIELDBYNAME('TARIH').ASDATETIME);   // TARIH is a datetime field.   
      ...
       XQSIPLIST.NEXT;
   END;
   XQSIPLIST.CLOSE;
   XQSIPLIST.FREE;

How can I retrieve true datetime from this database using TSynDBSQLDataSet.

Can anybody help me ?

Edit : But this Code block is retrieve true datetime value from database

   XDBCONNECTION:=TOleDBMSSQLConnectionProperties.Create(....);
   XDATA:=XDBCONNECTION.EXECUTE(STRINGTOUTF8(XSQLSTR),[]);
   WHILE XDATA.STEP DO BEGIN
     XBASTARIH:=XDATA.ColumnDateTime('TARIH'); // TARIH is a TdateTime field
     SHOWMESSAGE(XDATETIMETOSTR(XBASTARIH));
   END;

sorry for code blocks sad

#12 Re: mORMot 1 » Server program suggestion to decision? » 2016-06-27 08:25:41

Thanks a lot.

May I send an test application to you for adding to samples? (as soon as possible)

#13 Re: mORMot 1 » Server program suggestion to decision? » 2016-06-27 07:49:28

2) Define objects, then use those objects as input/output parameters to service interface methods.

as I understood this an example;

define an invoice  object which contain or referanced
   define an customer object
   define lines object
   define payment object
   define shipment object

Use this object via service interfaces method.

an object may be has referanced one or more than one object.

is it correct ?

If I do this am I make an DDD design?

#14 Re: mORMot 1 » Server program suggestion to decision? » 2016-06-25 09:33:41

fisrtly thanks for your reply;
I have got some question;
1)
  for accounting context: One action is creating an invoice
     This action has got these steps
        - choose customer
        - optionally add shipment address
        - choose invonice line item and change or accept priece (one or more)
        - after inserting/editing lines optionally make discount
        - choose payment metod and if necesssary take payment)
        - save invoice     
        - print /send /report this invoice.

For these steps which way you prefer;
   a - each step has got an interface
   or   
   b - all of steps only one interface

a or b ?

2) another my question is;
    for accounting context has got more than one action/section.
         - demand and offers,
         - customers,
         - invoices, 
         - bank,
         - spending money some action etc.
   for each action could I implement a service interface than all accounting interfaces implemant one accounting interface
   or
   implement only one accounting interface and all of accounting actions published an interface section per action.

sorry my bad english:(

#15 mORMot 1 » Server program suggestion to decision? » 2016-06-24 07:37:57

zekeriye
Replies: 6

Hi;
I am a newbie delphi and mormot too...
I want to desing a program which has got a lot of part.
I want to use mormot framework to writing this program. Mormot is very nice framework thanks alot to contributors.
All of program(s) share  one database (schema)
Data may be store on a MSSQL Server 2008 or over version, may be MSSQL2005

When I was collecting parts of program has got only five main part.
1th - Some of user use a program on a windows PC these are VCL client1 from local network or RDP (alternatively may be websockets remotely) (Most of users)
(This part of program looks like an accounting system)
2nd - Some of user use another screens using windows PC which is different from fist. These are VCL Client2 from local network or RDP (alternatively may be websockets remotely) (Most of users) (This part of program looks like manufacturing service)
3rd - Some of user use an android/ios device for entry very small data or take reports from data. (a few users) (this part of program looks like a pivot table report or looks like sending items using barcode) May be this part of program divide with two different part. One of take pivot report and other part is sending items using barcode)
4th - Some of user input data from via web interface (I think for broken comminucation, may be run a syncdata services) using online store. (I haven't got any idea and knowledge how much users may be use web interface) (This part of program looks like a hotel booking/reservation service)
5th - Data import/export for importing/exporting with using an other programs (via TXT, CSV, XLS, XLSX etc) and share some of data.

How can I design the server program(s).?
All of this function is mix and run only one service(server) applicaton ?
or
One service(server) application one of that position. Now we got 4 position and 4 service (server) application?
Which type of server(service) application to that position RestFull, RestServer, Restserver ORM, etc ?
Which one is best solution ? Which way I used pfreferred solution ?

Can you help me suggestion to solve this decision.

ps: sorry my bad english.

Board footer

Powered by FluxBB