#1 Re: mORMot 1 » SQL Lite3 to Oracle migration » 2017-09-04 14:45:18

Thanks again. And sorry for the extensive code snipset. I was not aware of this rule.

I followd the TITL_27 and TITL_146 article. To keep it short. As I interpret it right know you have to use FireDac, AnyDac or ODBC to connect directly to Oracle. We use our own driver DOA. Is there a possability to use our on driver? Or is this to far fetched?

Kind regards

#2 Re: mORMot 1 » SQL Lite3 to Oracle migration » 2017-08-30 12:35:49

Thanks again for your help. I have tried to just replace the TSQLDBOracleConnectionProperties. I can see this is used in the projects 12, 15 and 16. I dont see te technical solution to integrate it in to the '30 - MVC' project. As a basis a took the moongoDB variant, but i dont know how to integrate the TSQLDBOracleConnectionProperties into it.

To change the approach, i see the '\SQLite3\Samples\ThirdPartyDemos\EMartin\TSynRestDataset' project. This is also very close what i'm trying to achive. How could i switch this code from SQLLite to Oracle?

unit fMain;

interface

uses
  {$ifdef MSWINDOWS}
  Windows,
  Messages,
  {$endif}
  SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,
  SynCommons, mORMot, mORMotSQLite3, SynSQLite3Static,
  mORMotHttpServer, SampleData;

type
  TfrmMain = class(TForm)
    Label1: TLabel;
    Button1: TButton;
    Label2: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
  public
    Model: TSQLModel;
    DB: TSQLRestServerDB;
    Server: TSQLHttpServer;
  end;

var
  frmMain: TfrmMain;

implementation

uses
  mORMotDB;

{$R *.dfm}

procedure TfrmMain.Button1Click(Sender: TObject);
begin
  Close;
end;

procedure TfrmMain.FormCreate(Sender: TObject);
begin
  Model := CreateSampleModel;
  DB := TSQLRestServerDB.Create(Model, 'Project19Server.db3', False);
  DB.CreateMissingTables;
  Server := TSQLHttpServer.Create('8080',[DB],'+',HTTP_DEFAULT_MODE);
  Server.AccessControlAllowOrigin := '*'; // allow cross-site AJAX queries
end;

procedure TfrmMain.FormDestroy(Sender: TObject);
begin
  Server.Free;
  DB.Free;
  Model.Free;
end;

procedure TfrmMain.FormShow(Sender: TObject);
begin
  Label1.Caption := Caption;
end;

end.

#3 Re: mORMot 1 » SQL Lite3 to Oracle migration » 2017-08-30 08:14:00

Thanks for your reply. I started to investigate how to use a Oracle database. I have looked into the "30 - MVC" project. I tried to quickly change one of these projects to oracle. I couldn't manage that, because I lack the know how to congigure the ExternalDB and the server props. I found the "16 - Execute SQL via services" which i could connect to Oracle. But this application serves SQL statements and not a MVC Application. Is there a Oracle sample like the "30 - MVC application"?

Kind regards...

#4 mORMot 1 » SQL Lite3 to Oracle migration » 2017-08-28 13:38:24

ssbird
Replies: 7

I'm new to mORMot and i'm investigating the possibilities. Everything looks very promissing. For me the Samples\19 - AJAX ExtJS FishFacts demo is the most interesting demo, because it is close to my solution. The demo uses a SQLLite3 database. In the uses class there are the 'mORMotSQLite3, SynSQLite3Static,' files.

I want to migrate this demo to a Oracle database. Is there a alternative for Oracle to these 2 files. I Alreadty found the SunDBOracle. Just replacing these 2 for this one is not enough, as suspected. Is there somewone who did this before me?

Kind regards....

Board footer

Powered by FluxBB