#1 2014-11-19 10:12:10

ed
Member
Registered: 2014-11-19
Posts: 4

Use stored procedures in direct acces layer with the synDB.pas unit

We have an sql server we usually access with OLEDB. It is filled with business logic stored procedures returning datasets and return values. We would like to call this logic using synDB.pas direct access layer.
Is is possible to use parametrized stored procedures with returning datasets and return values using OLEDB and the synDB.pas unit?

Offline

#2 2014-11-19 10:45:58

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

Re: Use stored procedures in direct acces layer with the synDB.pas unit

It should work but was not fully tested yet.

My concern is about the returned datasets.
Cursors are implemented for SynDbOracle but not for OleDb yet.
Maybe you could help.

Offline

#3 2014-11-19 13:36:02

ed
Member
Registered: 2014-11-19
Posts: 4

Re: Use stored procedures in direct acces layer with the synDB.pas unit

I'll see if i can run some tests tonight.

Offline

#4 2014-11-23 10:55:28

ed
Member
Registered: 2014-11-19
Posts: 4

Re: Use stored procedures in direct acces layer with the synDB.pas unit

No luck, so far.
I can call the stored procedure fine. The resulting dataset just isn't returned.
It seems stored procedures in mssql don't return datasets the way queries do.
I'll look into the way TStoredProc does it on delphi, see if i can figure something out.

Offline

#5 2014-11-23 11:51:41

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

Re: Use stored procedures in direct acces layer with the synDB.pas unit

Yes, result sets output parameters are handled only by SynDBOracle by now.
I think you  can take a look at SynDBOracle to see how it was implemented at SynDB level.
There are already methods to return cursors in the SynDB interfaces.

Any hint to include them in SynOleDB may be very appreciated.

Offline

Board footer

Powered by FluxBB