N
nacheng
Unregistered / Unconfirmed
GUEST, unregistred user!
我用grid++作报表时出现错误如下:
没有定义参数begin
time,打开查询sql失败
在定义字段对话框时:我的代码如下:
数据库连接串
Provider=SQLOLEDB.1;
Persist Security Info=False;
User ID=sa;
Initial Catalog=ecard_comm_huzhou_reng_20080411;
Data Source=;
查询sql语句如下:
EXEC "lp_count" :begin
time, :Endtime
我写的存储过程lp_count如下:
CREATE procedure lp_count
@begin
time datetime ,@endtime datetime as
select left(convert(varchar(19),lp_employee.curtime,121),10)as 日期 ,lp_classroad.sort_id as 线路名称,lp_total_detail.employeeid as 人员编号,
lp_total_detail.name as 人员姓名,right(convert(varchar(19),lp_employee.curtime ,121),9)as 巡根时段,lp_control.ctlname as 巡根名称 from
(((((lp_class inner join lp_classroad on lp_class.classid=lp_classroad.classid)
inner join lp_timeplan on lp_classroad.lpno=LP_TIMEPLAN.lpno)
inner join lp_control on lp_control.lpno=lp_timeplan.lpno)
inner join lp_total_detail on lp_total_detail.lpno=lp_control.lpno) inner join lp_employee on lp_employee.cardserialno=lp_total_detail.cardserialno)
where left(convert(varchar(19),lp_employee.curtime,121),10) between @begin
time and @endtime
GO
没有定义参数begin
time,打开查询sql失败
在定义字段对话框时:我的代码如下:
数据库连接串
Provider=SQLOLEDB.1;
Persist Security Info=False;
User ID=sa;
Initial Catalog=ecard_comm_huzhou_reng_20080411;
Data Source=;
查询sql语句如下:
EXEC "lp_count" :begin
time, :Endtime
我写的存储过程lp_count如下:
CREATE procedure lp_count
@begin
time datetime ,@endtime datetime as
select left(convert(varchar(19),lp_employee.curtime,121),10)as 日期 ,lp_classroad.sort_id as 线路名称,lp_total_detail.employeeid as 人员编号,
lp_total_detail.name as 人员姓名,right(convert(varchar(19),lp_employee.curtime ,121),9)as 巡根时段,lp_control.ctlname as 巡根名称 from
(((((lp_class inner join lp_classroad on lp_class.classid=lp_classroad.classid)
inner join lp_timeplan on lp_classroad.lpno=LP_TIMEPLAN.lpno)
inner join lp_control on lp_control.lpno=lp_timeplan.lpno)
inner join lp_total_detail on lp_total_detail.lpno=lp_control.lpno) inner join lp_employee on lp_employee.cardserialno=lp_total_detail.cardserialno)
where left(convert(varchar(19),lp_employee.curtime,121),10) between @begin
time and @endtime
GO