CREATE PROCEDURE DeletetblOfficeEquipmentProfileRecord
@OE_ID varchar(11)
AS
BEGIN
DELETE FROM [EOEMS].[dbo].[tblOfficeEquipmentProfile]
WHERE [OE_ID]=@OE_ID
END
RETURN
GO
Dim cmd As SqlCommand = sqlconn.CreateCommand
sqlconn.Open()
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@OE_ID", SqlDbType.VarChar, 11, "oeq-su-001")
cmd.Parameters("@OE_ID").Value = "oeq-su-001"
cmd.CommandText = "DeletetblOfficeEquipmentProfileRecord"
cmd.ExecuteNonQuery()
sqlconn.Close()
拿出新代码,oeq-su-001
是我数据库中的例子之一OE_ID
。