I have stored procedure in Oracle
CREATE OR REPLACE PROCEDURE proc1 (p_param1 INTEGER, p_param2 CHAR, p_param3 INTEGER)
AS
BEGIN
...
END;
and I call it in Oracle SQL Developer using this statement:
EXECUTE proc1(2013, 1, 3);
I try to call it in C# from Visual Studio but it doesn't works
_db.Execute("EXEC proc1 (2013, 1, 3)");
How can I properly call it in C#?
Thanks.
EXEC
is a command of SQL*Plus. Try to use command withoutEXEC
or in anonymous PL/SQL block:or
Also, in this case,
1
could be converted to CHAR automatically, and in other cases you need to use quotes''
: