1
Answer

project code ERROR

Ask a question
Niketa Kapoor

Niketa Kapoor

13y
1.3k
1
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)