存储过程中的数字或值错误

时间:2018-04-29 22:05:19

标签: sql oracle plsql oracle11g

你好我有一个oracle数据库,我试图添加一个程序来根据输入选择驱动程序然而我收到此错误消息数字或值错误 如果我从过程中删除varchar2输出并尝试在plsql中没有问题发生 enter image description here

OracleCommand command = new OracleCommand();
            command.Connection = connection;
            command.CommandType = CommandType.StoredProcedure;
            command.CommandText = "SelectDrive";

            command.Parameters.Add("LicenseNumber", OracleDbType.Int32, ParameterDirection.Input);
            command.Parameters["LicenseNumber"].Value = Int32.Parse(bunifuMaterialTextbox2.Text);

            command.Parameters.Add("FirstNamee", OracleDbType.Varchar2, ParameterDirection.Output);
            command.Parameters.Add("LastNamee", OracleDbType.Varchar2, ParameterDirection.Output);
            command.Parameters.Add("ContactNumberr", OracleDbType.Int32, ParameterDirection.Output);


            int r = command.ExecuteNonQuery();




create or replace
PROCEDURE "SELECTDRIVE" 
 (LicenseNumber in number, FirstNamee out VARCHAR2, LastNamee out VARCHAR2, ContactNumberr out NUMBER)
as
begin

select d.firstname, d.lastname, d.contactnumber 
into   FirstNamee , LastNamee , ContactNumberr
from   Driver d
where LicenseNumber=d.license;
end;

任何想法?

0 个答案:

没有答案