#1 Yesterday 09:34:54

FlaviusFX
Member
From: UK
Registered: 2025-10-08
Posts: 4
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 (Today 08:05:56)

Offline

Board footer

Powered by FluxBB