我有一个存储过程,不知何故
create SP_justest
(@datefrom as smalldatetime,
@dateto as smalldatetime,
@rank as varchar(1),
@Filter as varchar(8000)
)
select * from finhours
where (div_cde = @filter)
and date_from = @datefrom
and date_to = @dateto
and rank = @rank
GO
所以在 vb.net 中,我有一个调用存储过程的子程序,这里是子程序的确切代码:
Private Sub InsertPayRollRecords()
Try
'SQLConn.Open()
sqlcomm.CommandText = "dbo.SP_INSERTVALUESINTOPR"
sqlcomm.CommandType = CommandType.StoredProcedure
sqlcomm.Parameters.Add("@DATEFROM", DateValue(dtpCFrom.Value))
sqlcomm.Parameters.Add("@DATETO", DateValue(dtpCTo.Value))
sqlcomm.Parameters.Add("@RANK", rank)
sqlcomm.Parameters.Add("@FILTER", ReturnDivision())
sqlcomm.Connection = SQLConn
sqlcomm.CommandTimeout = 999999
sqlcomm.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
@filter 的值如下:
'AP0' OR div_cde = 'FO0' OR div_cde = 'ME0' OR div_cde = 'SO0' OR div_cde = 'XO0'
问题是,当我从 VB.net 2000 启动它时,我根本没有遇到任何错误,它只是没有