sql - An SqlParameter with ParameterName '@OE_PurchaseDate' is not contained by this SqlParameterCollection -


im getting error when changed textbox datetimepicker

here code

        dim cmd sqlcommand = sqlconn.createcommand         sqlconn.open()         cmd.commandtype = commandtype.storedprocedure         cmd.commandtext = "addofficeequipmentprofile"         cmd.parameters("@oe_purchasedate").value = dtppurchasedate.value         cmd.executenonquery()         sqlconn.close 

this stored procedure follows

create procedure addofficeequipmentprofile (  @oe_purchasedate    smalldatetime,        )  insert tblofficeequipmentprofile (oe_purchasedate)  values (@oe_purchasedate) go 

i think error message quite straightforward. need add parameter before attempting set value.

cmd.commandtext = "addofficeequipmentprofile" cmd.parameters.add("@oe_purchasedate",sqldbtype.smalldatetime) cmd.parameters("@oe_purchasedate").value = dtppurchasedate.value 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -