Niketa Kapoor

Niketa Kapoor

  • NA
  • 42
  • 2.3k

project code ERROR

Apr 6 2011 12:53 PM
data base table=book_details with column tag_id, book_name,
book_category_id...(F_K),author_name

gui form:- tag_id textbox,name texbox,author name

when add button is click,the data is saved in the database.But here comes an error of"data not matched" "partameters conversion"....
The book_category_id is showing ERROR as this is not in the gui form....
da.InsertCommand.parameters.add("@book_category_id",sqldbtype.int).value=???????

SUGGEST ME THE CODE FOR IT.....to overcome from the error and data get saved in database.
if i put value=1; it is working but i don't want to do it like this.
I want that book_category_id get automatically from the book_categories table in which book_category_id is identity...


Answers (1)