#1 Re: mORMot 1 » How to executed custom SQL statements? (In ORM) » 2016-03-26 02:52:52

In TMVCApplication or it's derivative class ,
Is it possible to get instance of TSQLDBConnectionProperties (or TSQLDBConnection)?

i.e.
type
TMvcApp = class(TMVCApplication, IMyIntf)
   public
    procedure MyMethod ();
end;

-------impl--------
procedure TMvcApp.MyMethod ();
var
  props:TSQLDBConnectionProperties ;
begin

  //get TSQLDBConnectionProperties
  props:=Self.RestModel.GetDBConnectionProperties;

  ..... do something......

end;

#2 Re: mORMot 1 » How to executed custom SQL statements? (In ORM) » 2016-03-25 08:53:18

i.e.

select * from table1 order by fld1 asc,fld2 desc,fld3

Multiple fields, sort

I found ,mormot ORM only one sort field is supported . (in mssql 2008)

#3 mORMot 1 » How to executed custom SQL statements? (In ORM) » 2016-03-25 06:14:23

acid
Replies: 5

Hello,

Create a web appliction with mORMot Framework. (MVC + ORM)
I want to executed custom SQL ,get some record from external DB . (Select)

In TMVCApplication,

var
  res:ISQLDBRows;
begin
  res:=RestModel.Execute(...) ?
  ...
end;

What should I do?

Board footer

Powered by FluxBB