p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: Weird Error


Message #1 by "George Oro" <george@c...> on Tue, 18 Jun 2002 16:21:17 +0400
Hi Guys,

I just received one complain from my Client that they cannot load any new record from the database (Error something: Duplicate ID).
As far as I remember the Index is only the ID which is an AutoNumber.

I visited them and check the table, I found the last AutoNumber is 799. When I tried to load a new record on the table, the
AutoNumber start something in 455. How this things happen? as far as I know AutoNumber is programmed to increment by 1.

This things happen only if someone will run an Append Query and define a specific number (455) to append to the AutoNumber field.
But I'm sure on one there is capable of doing this. What I did now is, I create an Append Query and defined number 800 and append to
the AutoNumber field and add a dummy records 801 and run the Compaq and Repair Database. So far it is fine, but did I made the
correct solution to fix this problem?

Please advice...


Cheers,
George



Message #2 by "Amy Wyatt" <amyw@c...> on Tue, 18 Jun 2002 14:00:08
I think the only thing you would have to do is to compact and repair the 
database. When this is done it resets the autonumber to the next number. 
However, if you are getting corruption in the database for some reason you 
probably want to chack that out as well. 

Good luck,

Amy

> Hi Guys,

I just received one complain from my Client that they cannot load any new 
record from the database (Error something: Duplicate ID).
As far as I remember the Index is only the ID which is an AutoNumber.

I visited them and check the table, I found the last AutoNumber is 799. 
When I tried to load a new record on the table, the
AutoNumber start something in 455. How this things happen? as far as I 
know AutoNumber is programmed to increment by 1.

This things happen only if someone will run an Append Query and define a 
specific number (455) to append to the AutoNumber field.
But I'm sure on one there is capable of doing this. What I did now is, I 
create an Append Query and defined number 800 and append to
the AutoNumber field and add a dummy records 801 and run the Compaq and 
Repair Database. So far it is fine, but did I made the
correct solution to fix this problem?

Please advice...


Cheers,
George



Message #3 by Alex Jones <Alex.Jones@c...> on Tue, 18 Jun 2002 09:38:30 -0400
Access will not let you set a Id number in an auto generated field. If you
do this that may be the source of alot of your problems and worst down the
road. append a record to the file and let access auto the number for you.
Access is like SQL numbering for auto fields. If you have this field on a
form or page then drop a copy  and hide it. Acc is not going to reuse and
numbers that have been deleted. ( User error ). If you reset the record
numbers also be aware of the relations to that table where you may be using
the ID to relate Records in other tables. build a test database and import
that file and then vise versa. also unhide the sys tables and check them.


-----Original Message-----
From: Amy Wyatt [mailto:amyw@c...]
Sent: Tuesday, June 18, 2002 10:00 AM
To: Access
Subject: [access] Re: Weird Error


I think the only thing you would have to do is to compact and repair the 
database. When this is done it resets the autonumber to the next number. 
However, if you are getting corruption in the database for some reason you 
probably want to chack that out as well. 

Good luck,

Amy

> Hi Guys,

I just received one complain from my Client that they cannot load any new 
record from the database (Error something: Duplicate ID).
As far as I remember the Index is only the ID which is an AutoNumber.

I visited them and check the table, I found the last AutoNumber is 799. 
When I tried to load a new record on the table, the
AutoNumber start something in 455. How this things happen? as far as I 
know AutoNumber is programmed to increment by 1.

This things happen only if someone will run an Append Query and define a 
specific number (455) to append to the AutoNumber field.
But I'm sure on one there is capable of doing this. What I did now is, I 
create an Append Query and defined number 800 and append to
the AutoNumber field and add a dummy records 801 and run the Compaq and 
Repair Database. So far it is fine, but did I made the
correct solution to fix this problem?

Please advice...


Cheers,
George





This message and any included attachments are from Columbus Regional
Healthcare System and are intended only for the addressee(s).
The information contained herein may include trade secrets, privileged, or
otherwise confidential information.  Unauthorized review, forwarding,
printing, copying, distributing, or using such information is strictly
prohibited.  If you received this message in error or have reason to believe
you are not authorized to receive it, please promptly delete this message
and notify the sender by email with a copy to postmaster@c...  Thank
you.
Message #4 by "George Oro" <george@c...> on Tue, 18 Jun 2002 18:13:20 +0400
Alex,

I'm using the AutoNumber field as my ID.


Cheers,
George


-----Original Message-----
From: Alex Jones [mailto:Alex.Jones@c...]
Sent: Tuesday, June 18, 2002 5:38 PM
To: Access
Subject: [access] Re: Weird Error


Access will not let you set a Id number in an auto generated field. If you
do this that may be the source of alot of your problems and worst down the
road. append a record to the file and let access auto the number for you.
Access is like SQL numbering for auto fields. If you have this field on a
form or page then drop a copy  and hide it. Acc is not going to reuse and
numbers that have been deleted. ( User error ). If you reset the record
numbers also be aware of the relations to that table where you may be using
the ID to relate Records in other tables. build a test database and import
that file and then vise versa. also unhide the sys tables and check them.


-----Original Message-----
From: Amy Wyatt [mailto:amyw@c...]
Sent: Tuesday, June 18, 2002 10:00 AM
To: Access
Subject: [access] Re: Weird Error


I think the only thing you would have to do is to compact and repair the 
database. When this is done it resets the autonumber to the next number. 
However, if you are getting corruption in the database for some reason you 
probably want to chack that out as well. 

Good luck,

Amy

> Hi Guys,

I just received one complain from my Client that they cannot load any new 
record from the database (Error something: Duplicate ID).
As far as I remember the Index is only the ID which is an AutoNumber.

I visited them and check the table, I found the last AutoNumber is 799. 
When I tried to load a new record on the table, the
AutoNumber start something in 455. How this things happen? as far as I 
know AutoNumber is programmed to increment by 1.

This things happen only if someone will run an Append Query and define a 
specific number (455) to append to the AutoNumber field.
But I'm sure on one there is capable of doing this. What I did now is, I 
create an Append Query and defined number 800 and append to
the AutoNumber field and add a dummy records 801 and run the Compaq and 
Repair Database. So far it is fine, but did I made the
correct solution to fix this problem?

Please advice...


Cheers,
George





This message and any included attachments are from Columbus Regional
Healthcare System and are intended only for the addressee(s).
The information contained herein may include trade secrets, privileged, or
otherwise confidential information.  Unauthorized review, forwarding,
printing, copying, distributing, or using such information is strictly
prohibited.  If you received this message in error or have reason to believe
you are not authorized to receive it, please promptly delete this message
and notify the sender by email with a copy to postmaster@c...  Thank
you.


Message #5 by "Gregory Serrano" <SerranoG@m...> on Tue, 18 Jun 2002 17:35:53
George,

I think what Alex is (correctly) getting at is your append query should 
not allow anyone to enter anything in the ID field.  Access will do that 
by itself.  No one should be entering 800 or 801 or anything *at all*.  
Let Access put a number there.  That's probably the cause of your errors, 
and if so, the error is not weird at all!  :)

Greg
Message #6 by "enZo :-\)" <enzaux@g...> on Wed, 19 Jun 2002 08:32:27 +0800
I'm not quite sure Goerge but Compacting and Repairing the Database would do....I guess.  Because that's my first option everytime
I encounter an error on TABLES.

Enzo

-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Tuesday, June 18, 2002 8:21 PM
To: Access
Subject: [access] Weird Error


Hi Guys,

I just received one complain from my Client that they cannot load any new record from the database (Error something: Duplicate ID).
As far as I remember the Index is only the ID which is an AutoNumber.

I visited them and check the table, I found the last AutoNumber is 799. When I tried to load a new record on the table, the
AutoNumber start something in 455. How this things happen? as far as I know AutoNumber is programmed to increment by 1.

This things happen only if someone will run an Append Query and define a specific number (455) to append to the AutoNumber field.
But I'm sure on one there is capable of doing this. What I did now is, I create an Append Query and defined number 800 and append
to
the AutoNumber field and add a dummy records 801 and run the Compaq and Repair Database. So far it is fine, but did I made the
correct solution to fix this problem?

Please advice...


Cheers,
George







Message #7 by "enZo :-\)" <enzaux@g...> on Wed, 19 Jun 2002 08:42:24 +0800

	I agree with Alex.  You can't set a value for an AutoNumber field.  If you want to set the ID manually then create a code that
will do as what the AutoNumber does.  In that way you could have totally in control of the numbers.  I use this method if I needed
a series of number that don't jump like ID number and Transaction Number.

Enzo

-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Tuesday, June 18, 2002 10:13 PM
To: Access
Subject: [access] Re: Weird Error


Alex,

I'm using the AutoNumber field as my ID.


Cheers,
George


-----Original Message-----
From: Alex Jones [mailto:Alex.Jones@c...]
Sent: Tuesday, June 18, 2002 5:38 PM
To: Access
Subject: [access] Re: Weird Error


Access will not let you set a Id number in an auto generated field. If you
do this that may be the source of alot of your problems and worst down the
road. append a record to the file and let access auto the number for you.
Access is like SQL numbering for auto fields. If you have this field on a
form or page then drop a copy  and hide it. Acc is not going to reuse and
numbers that have been deleted. ( User error ). If you reset the record
numbers also be aware of the relations to that table where you may be using
the ID to relate Records in other tables. build a test database and import
that file and then vise versa. also unhide the sys tables and check them.


-----Original Message-----
From: Amy Wyatt [mailto:amyw@c...]
Sent: Tuesday, June 18, 2002 10:00 AM
To: Access
Subject: [access] Re: Weird Error


I think the only thing you would have to do is to compact and repair the
database. When this is done it resets the autonumber to the next number.
However, if you are getting corruption in the database for some reason you
probably want to chack that out as well.

Good luck,

Amy

> Hi Guys,

I just received one complain from my Client that they cannot load any new
record from the database (Error something: Duplicate ID).
As far as I remember the Index is only the ID which is an AutoNumber.

I visited them and check the table, I found the last AutoNumber is 799.
When I tried to load a new record on the table, the
AutoNumber start something in 455. How this things happen? as far as I
know AutoNumber is programmed to increment by 1.

This things happen only if someone will run an Append Query and define a
specific number (455) to append to the AutoNumber field.
But I'm sure on one there is capable of doing this. What I did now is, I
create an Append Query and defined number 800 and append to
the AutoNumber field and add a dummy records 801 and run the Compaq and
Repair Database. So far it is fine, but did I made the
correct solution to fix this problem?

Please advice...


Cheers,
George





This message and any included attachments are from Columbus Regional
Healthcare System and are intended only for the addressee(s).
The information contained herein may include trade secrets, privileged, or
otherwise confidential information.  Unauthorized review, forwarding,
printing, copying, distributing, or using such information is strictly
prohibited.  If you received this message in error or have reason to believe
you are not authorized to receive it, please promptly delete this message
and notify the sender by email with a copy to postmaster@c...  Thank
you.






Message #8 by "George Oro" <george@c...> on Wed, 19 Jun 2002 13:39:22 +0400
Thanks for the tips guys... I sorted out!


Cheers,
George


-----Original Message-----
From: enZo :-) [mailto:enzaux@g...]
Sent: Wednesday, June 19, 2002 4:42 AM
To: Access
Subject: [access] Re: Weird Error




	I agree with Alex.  You can't set a value for an AutoNumber field.  If you want to set the ID manually then create a code that
will do as what the AutoNumber does.  In that way you could have totally in control of the numbers.  I use this method if I needed
a series of number that don't jump like ID number and Transaction Number.

Enzo

-----Original Message-----
From: George Oro [mailto:george@c...]
Sent: Tuesday, June 18, 2002 10:13 PM
To: Access
Subject: [access] Re: Weird Error


Alex,

I'm using the AutoNumber field as my ID.


Cheers,
George


-----Original Message-----
From: Alex Jones [mailto:Alex.Jones@c...]
Sent: Tuesday, June 18, 2002 5:38 PM
To: Access
Subject: [access] Re: Weird Error


Access will not let you set a Id number in an auto generated field. If you
do this that may be the source of alot of your problems and worst down the
road. append a record to the file and let access auto the number for you.
Access is like SQL numbering for auto fields. If you have this field on a
form or page then drop a copy  and hide it. Acc is not going to reuse and
numbers that have been deleted. ( User error ). If you reset the record
numbers also be aware of the relations to that table where you may be using
the ID to relate Records in other tables. build a test database and import
that file and then vise versa. also unhide the sys tables and check them.


-----Original Message-----
From: Amy Wyatt [mailto:amyw@c...]
Sent: Tuesday, June 18, 2002 10:00 AM
To: Access
Subject: [access] Re: Weird Error


I think the only thing you would have to do is to compact and repair the
database. When this is done it resets the autonumber to the next number.
However, if you are getting corruption in the database for some reason you
probably want to chack that out as well.

Good luck,

Amy

> Hi Guys,

I just received one complain from my Client that they cannot load any new
record from the database (Error something: Duplicate ID).
As far as I remember the Index is only the ID which is an AutoNumber.

I visited them and check the table, I found the last AutoNumber is 799.
When I tried to load a new record on the table, the
AutoNumber start something in 455. How this things happen? as far as I
know AutoNumber is programmed to increment by 1.

This things happen only if someone will run an Append Query and define a
specific number (455) to append to the AutoNumber field.
But I'm sure on one there is capable of doing this. What I did now is, I
create an Append Query and defined number 800 and append to
the AutoNumber field and add a dummy records 801 and run the Compaq and
Repair Database. So far it is fine, but did I made the
correct solution to fix this problem?

Please advice...


Cheers,
George





This message and any included attachments are from Columbus Regional
Healthcare System and are intended only for the addressee(s).
The information contained herein may include trade secrets, privileged, or
otherwise confidential information.  Unauthorized review, forwarding,
printing, copying, distributing, or using such information is strictly
prohibited.  If you received this message in error or have reason to believe
you are not authorized to receive it, please promptly delete this message
and notify the sender by email with a copy to postmaster@c...  Thank
you.









  Return to Index