#1 2025-10-14 09:34:54

FlaviusFX
Member
From: UK
Registered: 2025-10-08
Posts: 5
Website

Creating a TRestServerDB in mORMot2 to work with an external MS SQL

I am looking at using mORMot2 for a large Delph 12/13 archaeological project for an HTTPS REST server to start with. This a major project to modernise operations.

I am in the procssing of build a small prototype

HTTPS Rest server that connects to our MS SQL databases.
Clients from Delphi VCL, Andriod FMX apps and web pages.

Creating a TRestServerDB in mORMot2 to work with an external MS SQL database involves two main steps:
1. Instantiate TRestServerDB using an in-memory SQLite database as its internal ORM kernel. You can use :memory: as the database name for this purpose.
2.Register your existing MS SQL tables with the mORMot2 framework using VirtualTableExternalRegister.

Is this approach correct to use its native SQLite ORM capabilities while routing read and write operations to your external MS SQL database?

Does the below look right?

https://gist.github.com/FIFernandes

Last edited by FlaviusFX (2025-10-15 08:05:56)

Offline

#2 Yesterday 08:16:38

anouri
Member
Registered: 2024-02-11
Posts: 120

Re: Creating a TRestServerDB in mORMot2 to work with an external MS SQL

your gist link is not public.

Last edited by anouri (Yesterday 08:17:00)

Offline

#3 Yesterday 10:44:58

FlaviusFX
Member
From: UK
Registered: 2025-10-08
Posts: 5
Website

Re: Creating a TRestServerDB in mORMot2 to work with an external MS SQL

Thank you, I have now made it public.

Offline

Board footer

Powered by FluxBB