delphi 2009 SQLStoredProc执行错误说没参数?(100)

  • 主题发起人 主题发起人 dafuwengqing
  • 开始时间 开始时间
D

dafuwengqing

Unregistered / Unconfirmed
GUEST, unregistred user!
SQLStoredProc.StoredProcName:='[dbo].[UpDIMS]'; SQLStoredProc.ParamByName('@Mindex').AsInteger:=mInfo.Mindex; SQLStoredProc.ParamByName('@Longitude').AsInteger:=mInfo.Longitude; SQLStoredProc.ParamByName('@Latitude').AsInteger:=mInfo.Latitude; SQLStoredProc.ParamByName('@Angle').AsInteger:=mInfo.Angle; SQLStoredProc.ParamByName('@Speed').AsInteger:=mInfo.Speed; SQLStoredProc.ParamByName('@Time').AsInteger:=mInfo.Time; SQLStoredProc.ExecProc; 存储过程如下: ALTER PROCEDURE [dbo].[UpDIMS] -- Add the parameters for the stored procedure here @Mindex int, @Longitude int, @Latitude int, @Angle int, @Speed int, @Time datetime AS BEGIN --判断db_info中是否存在记录 if(select count(*) from db_info where Mindex=@Mindex)>0 update db_info set Longitude=@Longitude,Latitude=@Latitude,Speed=@Speed,Angle=@Angle,[Time]=@Time where Mindex=@Mindex else insert into db_info values(@Mindex,@Longitude,@Latitude,@Speed,@Angle,@Time) insert into db_info_his values(@Mindex,@Longitude,@Latitude,@Speed,@Angle,@Time) END
 
后退
顶部