最近我写了一个Oracle存储过程如下:
create table testt(param varcahr(50), len number, ts date);
create or replace procedure testp(p_a varchar)
IS
BEGIN
insert into testt(param,len,ts) values(p_a,length(p_a),sysdate);
commit;
End;
我在SQL Developer中直接执行这个存储过程 testp('12345') 系统显示长度是5,而 我使用OLEDB.Oracle驱动,使用C#程序执行这个存储过程时,发现同样的调用记录却显示长度为6.
我的系统是Windows 2008, 数据库是 Oracle 11G 11.2.0.1
我运行程序的电脑是Win 7,.Net Framwork4.5
望高手指导一下!
谢谢!