AUTOINCREMENT IN SQL SERVER 2005??
db name:-mydatabase
table name:-login
coulms:-id(int,identityspecification-yes,identity increment=1,identity seed=1)
username(varchar 50, primarykey)
password(varchar 50)
now when I'm trying to insert, theres no problem if the record is not available.
but problem occurs when a record already exists.
id |username|password
1 | biswa | bitan
2 | hoity | toity
[now if I try to enter username=biswa and password=bitan
and the error handler produce an error message and stop
data insertion. if 2 attempts stopped by error handler. then
when I try for a new data, it looks like...]
5 | jack | jill
m really in problem....I need to increment the id when a valid insertion is done
please help me out....
thanks
__________________
Get the will power n U will be powered
Last edited by biswa; October 9th, 2009 at 02:16 AM..
|