This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm trying to call an oracle stored function like this: create or replace function next_seq_value Calling code looks like this: ProcedureQuery p = new ProcedureQuery("next_seq_value", new ProcedureParameter("seq_name", "dummy_seq"));Console.WriteLine(Repository.Calculate(p)); However, I'm getting this error: System.Data.OracleClient.OracleException : ORA-06550: line 1, column 33: ( - + case mod new not null <an identifier> Am I missing somethnig? Thanks
|
|
|
We had an issue here where we were always emitting the ":" prefix on parameters, which it seems Oracle was accepting in our test scenarios but not in this case. I have fixed this so that we now never emit the ":" prefix on stored procedure parameters. The fix will be included in nightly builds dated 10 Apr 2009 and above, available from about 1430 GMT. You will also need to make a change to the way you call the function. It seems that function return values do not come through the return value of the underlying ExecuteScalar call, but only through a return-value parameter. So you will need to change your calling code as follows: ProcedureParameter retparm = new ProcedureParameter("retval", 0, ParameterDirection.ReturnValue, null, null); (You may need to tweak the dummy value of retparm to be a long, or explicitly specify the database type instead of letting LightSpeed infer it.) I know this isn't very elegant; as a future enhancement we may try to tidy it up so that you can get the return value automatically through Calculate, but this is potentially tricky because we don't know at call time whether the thing we are invoking is a procedure or a function. Let us know if you still run into problems once you've got the fix. |
|
|
Ivan, Thanks, the fix did the trick.
|
|