#2 PDF Engine » how to make one sheet in portrait orientation and the other in landsc » 2019-05-10 18:01:09

Sargon
Replies: 2

Hello. Can you please tell me how to make one sheet in portrait orientation and the other in landscape (all in one document)? (using TGDIPages)

#3 Re: mORMot 1 » OCI-21560 error with Delphi 10.1 x64 app » 2018-02-12 11:32:10

mpv wrote:

Applied to trunk  see commit
Thanks for testing and sorry for issue

not at all!

ab wrote:

Nice catch!
smile

Perhaps the cleanest way to fix it is to use plain constant, and a ub4 pointer.
It will be closest to the way SynDBOracle access the low-level OCI API.
See https://synopse.info/fossil/info/e55e3e8635

Thanks!

#4 Re: mORMot 1 » OCI-21560 error with Delphi 10.1 x64 app » 2018-02-12 11:04:26

mpv wrote:

@Sargon - can you try to replace

OCITypeGetOpt = (OCI_TYPEGET_HEADER, OCI_TYPEGET_ALL);

to

{$MINENUMSIZE 4}
OCITypeGetOpt = (OCI_TYPEGET_HEADER, OCI_TYPEGET_ALL);
{$MINENUMSIZE 1}

and test your case? I don't have a x64 OCI right now to test.

GREAT!!! many many thanks!!! It's work. You are right!

#5 Re: mORMot 1 » OCI-21560 error with Delphi 10.1 x64 app » 2018-02-12 08:49:22

dexter wrote:

No, it does not.

I have noticed another thing: with one parameter everything is fine, with 2 it's not.

// this one fails in Win64 on second call
  Prop.Execute('SELECT * FROM fbnk_account t where t.recid = ? or t.recid = ?', ['1', '2']);

// this one is OK in Win64
Prop.Execute('SELECT * FROM fbnk_account t where t.recid = ?', ['1']);

I have the same problem. OCI is version 12.n, connecting to Oracle 11, berlin 10.1 x64

#6 Re: mORMot 1 » How to pass array as parameter to stored procedure in Oracle » 2018-02-10 14:09:18

mpv wrote:

I understand what you need. In SynDBOracle BindCursor work only for Out params. When I wrote " Much better to do this inside pl sql VM" I mean - better to create a PLSQL procedure what create a cursor inside and call your target procedure what take a cursor as a parameter. It will be easier and faster.

But you can try to implement binding for IN cursor params in SynDBOracle - see how we bind a arrays. We use a build-in types ODCINUMBERLIST and ODCIVARCHAR2LIST source. In your case you need to create your own type.

Many thanks, i'm try it

#7 Re: mORMot 1 » How to pass array as parameter to stored procedure in Oracle » 2018-02-09 20:32:34

mpv wrote:

Why you need to create cursor on delphi side and pass it back to oracle?  Much better to do this inside pl sql VM.
In any case bindCursor is for read data AFAIR

maybe I did not put the question correctly, I want to try to do it like this

#8 Re: mORMot 1 » How to pass array as parameter to stored procedure in Oracle » 2018-02-09 20:00:36

It seems that I need BindCursor, but how to work with it? Where can I find an example?

#9 Re: mORMot 1 » How to pass array as parameter to stored procedure in Oracle » 2018-02-09 19:47:40

mpv wrote:

See bindArray and comment above TSQLDBOracleStatement  declaration. Limited to array of int64/string

Many thanks!!!! It works! Oh, and one more question, can I pass the cursor (or the table) as a parameter, for example, in ODAC?

#10 mORMot 1 » How to pass array as parameter to stored procedure in Oracle » 2018-02-09 16:58:31

Sargon
Replies: 10

Hello, I need help please?

I'm newby in mORMot, and i can't find, how to pass array as parameter to stored procedure in Oracle (i'm try using synDBOracle)?

Can someone help me with the source code or link to an article?

Many thanks!

Board footer

Powered by FluxBB