recordcount

  • Thread starter Thread starter jack
  • Start date Start date
J

jack

Hi guys
im a beggner i want to get a record count of a particular
table. so that i can create an auto generaetd id for the project
please help....
 
its not a good idea (espesially when more then 1 process-thread can insert
records.). use guid's instead if you have to.
 
Hi guys
im a beggner i want to get a record count of a particular
table. so that i can create an auto generaetd id for the project
please help....

If you want an auto-generated ID, see if your database supports
it. SQLServer has "identity" columns, Access has "autonumber" columns,
in Oracle you can use "sequences".

Hans Kesting
 
is there any one out there who can help me in finding me the total
number of record in the database from front end so that a sequential
auto-generation can be done without the support of back end.(database
like sqlserver)
 
is there any data reader of dataset method through which this count can
be done .. thanks for the reply crow
 
you certainly shouldnt generate id manually. if somebody else inserts a row,
or another thread in your application inserts a row concurrently, your id
will be inconsistent. if you have to know the id, generate a guid and use it
as primary key of your table. System.Guid class will help you doing this.
 
Back
Top