Click here to Skip to main content
15,887,369 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I am creating a project on Library Management System.

I want to count the no of books currently available in currently in the library.
The no. of books vary according to its issue and return.
Kindly provide me the STORED PROCEDURE and the C# code to call the sp in the windows application.
My DB details:

1. Table library contains details regarding books with columns as:
book_name, book_author, book_id, book_price, book_quantity, avail_book_qty.

2. Table book_issue contains
book_id, stu_id, issue_date, return_date

The varying no. of books must get stored in avail_book_qty.
Posted
Comments
PIEBALDconsult 9-Feb-13 14:43pm    
I recommend you rethink your strategy; you probably shouldn't be storing the counts anywhere at all.
Yogesh_Mishra 9-Feb-13 14:57pm    
i am storing the count of total books in book_quantity and want the available book quantity to be stored in avail_book_qty.

1 solution

Kindly provide me the STORED PROCEDURE and the C# code to call the sp in the windows application.
No. It does not work like this here.

Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
 
Share this answer
 
Comments
Yogesh_Mishra 9-Feb-13 14:55pm    
Sir, i am done with rest of the work, like Adding book, Updating book and book_issue, book_return with date.
but having problems with the count of the books.
If you can solve this, please help.
thanks
Sandeep Mewara 9-Feb-13 14:57pm    
What you seek is no quick help... instead you are asking us to write and give the code to you. Not at all encouraged/supported.

Try out, and post specific issue if you face any.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900