错误提示:
<?xml version="1.0" encoding="UTF-8"?>
<string xmlns="http://tempuri.org/">ORA-06550: 第 1 行, 第 7 列: PLS-00306: 调用 'PRO_ADD_USER' 时参数个数或类型错误 ORA-06550: 第 1 行, 第 7 列: PL/SQL: Statement ignored </string>
----- Create table
create table TEST_A
(
USER_NO NUMBER not null,
USER_NAME VARCHAR2(20)
)
alter table TEST_A
add constraint TEST_A_PK primary key (USER_NO)
using index
tablespace USERS
。。。
----Create procedure
create or replace procedure pro_add_user(as_userno test_a.user_no%Type,
as_username test_a.user_name%Type,
ret_text out varchar) as
begin
insert into test_a (user_no, user_name) values (as_userno, as_username);
commit;
exception
when NO_DATA_FOUND then
ret_text := SUBSTR(SQLERRM, 1, 200);
rollback;
when others then
ret_text := SUBSTR(SQLERRM, 1, 200);
rollback;
end pro_add_user;
---- [WebMethod]
public string add_users(int user_no,string user_name)
{
string ls_message;
OracleConnection con = new OracleConnection(ls_continct);
ls_message = string.Empty;
try
{
con.Open();
try
{
OracleCommand com = new OracleCommand("pro_add_user",con);
com.Parameters.Clear();
com.CommandType = CommandType.StoredProcedure;
OracleParameter as_userno = new OracleParameter("as_userno", OracleType.Int16);
OracleParameter as_username = new OracleParameter("as_username", OracleType.VarChar,20);