Getting error: error no value given for one or more required parameters in vb.net for update sql query -



Getting error: error no value given for one or more required parameters in vb.net for update sql query -

these statement having problems. please help me solve error believe because of update statement

str = "update login set title=@title,author=@author,publisher=@publisher,series=@series isbn = @isbn" cmd = new oledbcommand (str, cn) cmd.parameters.addwithvalue("@title", title.text) cmd.parameters.addwithvalue("@author", author_name.text) cmd.parameters.addwithvalue("@publisher", publish.text) cmd.parameters.addwithvalue("@series", series.text) cmd.parameters.addwithvalue("@isbn", isbn_.text) cmd.executenonquery()

i don't think oledb back upwards parameters using @ syntax. seek using ? instead likle this:

str = "update login set title = ? ,author = ?,publisher = ?,series = ?" & "where isbn = ?" cmd = new oledbcommand (str, cn) cmd.parameters.addwithvalue("@title", title.text) cmd.parameters.addwithvalue("@author", author_name.text) cmd.parameters.addwithvalue("@publisher", publish.text) cmd.parameters.addwithvalue("@series", series.text) cmd.parameters.addwithvalue("@isbn", isbn_.text) cmd.executenonquery()

sql vb.net

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -