Hey guys!
I created .NET-based AEP for ADS v10 beta. Here is a procedure code. .NET side:
public int TestSP(int connectionId, int connection, ref int numRowsAffected)
{
AdsConnection cnn;
lock (_connections)
cnn = _connections[connectionId];
using (var cmd = cnn.CreateCommand())
{
cmd.CommandText = "INSERT INTO __error (errno, message) VALUES (20683, 'This is a test error message')";
cmd.ExecuteNonQuery();
}
return 0;
}
SQL side:
CREATE PROCEDURE TestSP_AEP(num Integer)
FUNCTION "TestSP" IN COMLIBRARY "MyNamespace.MyClass";
and
CREATE PROCEDURE TestSP_AEP_Empty() -- !NOTE! without parameters
FUNCTION "TestSP" IN COMLIBRARY "MyNamespace.MyClass";
With all this stuff, I'm having the following. The call
EXECUTE PROCEDURE TestSP_AEP_Empty();
produces an error:
poQuery: Error 7200: AQE Error: State = HY000; NativeError = 5154; [iAnywhere Solutions][Advantage SQL][ASA] Error 5154: Execution of the stored procedure failed. ProcError 20683: This is a test error message
And the call
EXECUTE PROCEDURE TestSP_AEP (123);
produces an error:
poQuery: Error 7200: AQE Error: State = HY000; NativeError = 5154; [iAnywhere Solutions][Advantage SQL][ASA] Execution of the stored procedure failed.
I'm stuck with it. Please advice.
Thanks, Ivan Eryshov.