#51 mORMot 1 » How to bind to a cursor on oracle » 2013-11-05 20:58:39

jvillasantegomez
Replies: 12

Hello

How can I bind my params to a cursor for calling a stored proc of oracle. Here is a simple use case:

PROCEDURE dummy (P_cursor IN OUT Globales.T_c_weak_cursor, P_id IN Integer) IS
BEGIN
  OPEN P_cursor FOR
     SELECT * FROM whatever
END dummy;

Here's a simple oracle procedure, now let's see what's going on in mormot:

query :=  'call dummy (P_cursor => ?, P_id => ?)';
stmt := Props.NewThreadSafeStatementPrepared(query, false); // or true, don't know how to do it
stmt.Bind(1, myCursorVariable, paramOut);           // <------------- HOW I CAN DO THIS????????
stmt.BindTextU(2, id, paramIn);
stmt.ExecutePrepared;
// Then how I can get the cursor variable and return all that as JSON.

I'm using mormot with an old project at work and I would like to be capable of reusing the oracle procedures and functions, but i can't find a way of binding to a cursor from an oracle procedure.

Any help will be much appreciated!!!!

#52 Re: mORMot 1 » Javascript authentication » 2013-10-24 17:02:12

Never mind.

I found that the problem with RangerX code was the crc32 function (not really his) but when I changed the function to the implementation found in https://github.com/h2non/jsHashes everything works as expected.

#53 Re: mORMot 1 » Javascript authentication » 2013-10-21 12:40:04

Hi

I'm using the code from RangerX to do the javascript authentication. However, the code doesn't seem to work as expected.

After valid authentication, some calls to the underlying service pass throug and some return 403 - FORBIDDEN. This is a very weird behaivour.

I thing that the problem is in the Nonce but I don't understand it well even after reading the Security chapter on the SAD.

If I change the authentication mode to TSQLRestServerAuthenticationNone all works perfectly, but when i go with TSQLRestServerAuthenticationDefault the behaviour is not as expected.

Can anyone please help?

Board footer

Powered by FluxBB