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? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -