The default time-out for a database connection is 10 seconds. If the specified server does not respond to the connection request, or if the network name lookup fails, the compilation or execution suspends for approximately 10 seconds. Use the SET OPTION statement to change the connection time-out.
其实我的存储过程有一个select语句,它返回数据
drop procedure dbo.certify_get_result
gocreate procedure certify_get_result
( @date datetime='6/18/2002 8:00',/*测试日期*/
@time_elaps int =30,/*测试时长*/
@worker_id char(6)='10737', /*收费员工号*/
@test_number int =0 /*试卷号*/
)as set nocount on /*这是邹键要求加上的,防止出现process broken*/
--exec certify @date,@time_elaps,worker_id
--id,OpTime,car_type,CarTypeCode,carTypeResult, car_num,CarNumber ,carNumerResult,car_toll_type,TollType,tollTypeResult,certify_ID car_ID car_type car_num carTypeResult
select id,OpTime,car_type,CarTypeCode,
carTypeResult=case CarTypeCode when car_type then '√' else '×' end ,
car_toll_type,CarNumber ,
carNumerResult=case CarNumber when car_num then '√' else '×' end ,
car_num,TollType,
tollTypeResult=case TollType when car_num then '√' else '×' end ,
certify_ID
from temptbl tt join certify_answer asw on id=car_id
and asw.certify_ID =@test_number
order by id desc运行:
certify_get_result
出现两种情况:1,程序正常运行,2,This command did not return data, and it did not return any rowsDB-Library Process Dead - Connection Broken很怪,将存储过程重新在某种程度上查询分析器中构建以后,又正常了,但只查了两三次又出现老问题
而且,在VC中ADO出属居然没有办法查出错误号.
当查询出错时,表temptbl 均存在并有相应数据
--exec certify @date,@time_elaps,worker_id
--id,OpTime,car_type,CarTypeCode,carTypeResult, car_num,CarNumber ,carNumerResult,car_toll_type,TollType,tollTypeResult,certify_ID car_ID car_type car_num carTypeResult 它们确实已被屏蔽了.
dbcc checkdb('数据库名')--检查表
dbcc checktable('表名')