当我将文本框更改为 datetimepicker 时出现此错误
这是我的代码
Dim cmd As SqlCommand = sqlconn.CreateCommand
sqlconn.Open()
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "AddOfficeEquipmentProfile"
cmd.Parameters("@OE_PurchaseDate").Value = dtpPurchaseDate.Value
cmd.ExecuteNonQuery()
sqlconn.close
这是我的存储过程如下
CREATE PROCEDURE AddOfficeEquipmentProfile
(
@OE_PurchaseDate smalldatetime,
)
AS
INSERT INTO tblOfficeEquipmentProfile (OE_PurchaseDate)
VALUES (@OE_PurchaseDate)
GO