#1 2017-04-08 00:46:28

dolfin
Member
Registered: 2015-09-11
Posts: 22

Execute firebird stored procedure via mormot

Hello!

I use mormot framework together with firebird db.
Is ther any way to execute custom sql query using mormot? I need execute stored procedure with params, and i don't know if it is possible.
I tried something like this, but with no luck.

FConnectionDefinition: TSynConnectionDefinition;
...
vDBConnectionParams := TSQLDBZEOSConnectionProperties.CreateFrom(FConnectionDefinition) as TSQLDBZEOSConnectionProperties;
vSQLDBStatementWithParamsAndColumns:= TSQLDBZEOSStatement.Create(vDBConnectionParams.NewConnection);
vSQLDBStatementWithParamsAndColumns.Connection.Connect;
vSQLDBStatementWithParamsAndColumns.Connection.StartTransaction;
vSQLDBStatementWithParamsAndColumns.Prepare('select OUTPUT_INT from TEST_MORMOT_PROC(1)');
vSQLDBStatementWithParamsAndColumns.ExecutePrepared;
vSQLDBStatementWithParamsAndColumns.Connection.Commit;

Many thx in advance!

Offline

#2 2017-04-08 13:13:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Execute firebird stored procedure via mormot

I'm not sure the transaction is mandatory.
AFAIR we force Firebird to have an implicit transaction (this is not the default setting with this DB).

Offline

Board footer

Powered by FluxBB