Page 1 of 1

Multiple Record Insert with Incremented value Issue

Posted: Fri Jul 31, 2009 8:57 am
by naveenkongati
I have developed a online library application which is running on intranet environment in my company. Now while doing enhancement of the application i am strucked up with an issue:
While inserting a new book into library database , i have to make copies of the same book record as per the user choice. Ex : User opts for 5 copies of a same book
5 records with the same data except book no. My book no format is as follows:
(E00001-E99999),(L00001-L99999),(N00001-N99999). Book No Format is as per the company standard.
From the Book Data Entry page i can take Book No,No Of Copies as a user input to the action page.Thereafter suggest me to proceed further with a sample to resolve this issue.
I am not using any class for this page
Thanks In Advance
Naveen

Re: Multiple Record Insert with Incremented value Issue

Posted: Fri Jul 31, 2009 12:54 pm
by aceconcepts
What are you trying to do?

Seems unclear.

Re: Multiple Record Insert with Incremented value Issue

Posted: Mon Aug 03, 2009 10:41 pm
by naveenkongati
Hi,
Thanks for all your suggetions. In my case, BOOK NO is not auto incremented it is a fixed value. So we need to make no of copies as pr the input by Librarian . Please check the following example:

Suppose Book No is:E01234 and No of Copies are 5
Book No for the next five books should be E01235, E01236, E01237, E01238, E01239.
Suppose Book No is:L00034 and No of Copies are 3
Book No for the next three books should be L00035, L00036, L00037.
Suppose Book No is:N00009 and No of Copies are 4
Book No for the next four books should be N00010, N00011, N00012,N00013
Kindly givn a solution as per according to this.

Thanks & Regards
Naveen

Re: Multiple Record Insert with Incremented value Issue

Posted: Wed Aug 05, 2009 2:26 pm
by aceconcepts
RE: McInfo

In the case that the initial book no entry exceeds the subsequent book no as per your example, validation would have to be executed in order to compare all the input book numbers. This is the only way round the problem of duplication within the database - as nothing should be stored until it has been checked and cleaned :D

I usually feel that auto increment are very necessary when it comes to databases and optimisation.

TO: naveenkongati - is there are reason why you cannot use auto increment?

Re: Multiple Record Insert with Incremented value Issue

Posted: Thu Aug 06, 2009 10:48 am
by naveenkongati
Hi,
Still our library is following the manual system along with the software. So, whenever any new book comes , made an entry into Register first thereafter record added to the database.
If we talk about 3 categories of books which represents a particular code under which books has to be purchased.