我在SQL里建了个存储过程:
CREATE PROCEDURE zdytx
@seq datetime
AS
begin tran
select 员工编号,员工姓名,合同结束日期 from ygda where datediff(MM,@seq,合同结束日期)=0
GO
然后我在delphi 里
在adocommand1 里设置 commandtype 为:cmdstoredpro
commandtext:zdytx;1
然后button1.click执行
adocommand1.parameters.parambyname('seq').value:=strtodate(datetimepicker1.date);
adocommand1.execute;
它运行时长时间不动,不知道问题出在哪里?请大家指点,如何改?谢谢……
CREATE PROCEDURE zdytx
@seq datetime
AS
begin tran
select 员工编号,员工姓名,合同结束日期 from ygda where datediff(MM,@seq,合同结束日期)=0
GO
然后我在delphi 里
在adocommand1 里设置 commandtype 为:cmdstoredpro
commandtext:zdytx;1
然后button1.click执行
adocommand1.parameters.parambyname('seq').value:=strtodate(datetimepicker1.date);
adocommand1.execute;
它运行时长时间不动,不知道问题出在哪里?请大家指点,如何改?谢谢……
.........
if @@Error > 0
rollback tran
else
commit tran
如果查询出来的记录有2条以上的话,它就出错提示:
project project1.exe raised exception class eoleexception with message'将截断字符串或二进制数据。'。process stopped .use step or run to continue.
请问这个又是什么原因呢?好郁闷呀,帮帮忙,谢谢大家的支持
wing_er,你能否帮我说清楚详细点吗?
你的DATATIME好像有问题
你没感觉到你的存储过程有问题吗?