You are not logged in.
Hi all,
I'm developing an application in Delphi that connects to a SQL Server.
I want to connect to MS SQL Server from my Delphi application without requiring additional components like ODBC or OLE DB on the target machine—just by deploying the executable file alone.
Is there a way to achieve my goal using mORMot2?
Offline
You can't with mORMot directly.
At least ODBC is needed.
There was a set of "direct" access components some years ago, but I can't find them anymore.
IIRC they were a bit of a hack, and not very stable.
Anyway, for "an application in Delphi that connects to a SQL Server without ODBC or OleDB", I see two possibilities:
1) Move all the DB connections on a mORMot REST server, using e.g. direct ODBC connection.
Then the client would use plain HTTP(S) or WebSockets to connect to your REST server.
2) Use mORMot remote SQL connection execution, and host a mORMot server for this connection.
Of course, the option 1) seems better to me.
And it is much easier to secure a REST server than a SQL server connection.
Just for security reasons, I would never connect the application directly to the DB, unless I have existing RAD code.
And performance is likely to be faster with a REST server than with a raw SQL connection, over a slow network.
Offline