473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Getting back a deleted record

Accidentally deleted a record. Anyway to get it back?

If not, I know the ID number - which is an autonumber field. Because
of the related data from other tables, would I be able to create a new
record and make its ID number, that of the deleted record?

Thanks!

magmike

Oct 12 '07 #1
12 5549
On Fri, 12 Oct 2007 14:34:26 -0000, magmike <ma******@yahoo.com>
wrote:

If you haven't done anything else with the db, a data recovery service
may still be able to get it back for you. Of course you can recover it
from last night's backup as well.

Sounds like you violated rule #1 of database design, and did not have
referential integrity enforcement selected in the table relationships.
That would have prevented the accidental delete. Fix that!

Yes, you can create an append query and specify the value of your ID
field.

-Tom.
>Accidentally deleted a record. Anyway to get it back?

If not, I know the ID number - which is an autonumber field. Because
of the related data from other tables, would I be able to create a new
record and make its ID number, that of the deleted record?

Thanks!

magmike
Oct 12 '07 #2
got an example of the append query for changing the ID #?

If I had referential integrity setup (i'll need to research that),
what would have happened when I selected Delete Record?

mike

On Oct 12, 10:01 am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Fri, 12 Oct 2007 14:34:26 -0000, magmike <magmi...@yahoo.com>
wrote:

If you haven't done anything else with the db, a data recovery service
may still be able to get it back for you. Of course you can recover it
from last night's backup as well.

Sounds like you violated rule #1 of database design, and did not have
referential integrity enforcement selected in the table relationships.
That would have prevented the accidental delete. Fix that!

Yes, you can create an append query and specify the value of your ID
field.

-Tom.
Accidentally deleted a record. Anyway to get it back?
If not, I know the ID number - which is an autonumber field. Because
of the related data from other tables, would I be able to create a new
record and make its ID number, that of the deleted record?
Thanks!
magmike- Hide quoted text -

- Show quoted text -
got an example of the append query for changing the ID #?

Oct 12 '07 #3
On Fri, 12 Oct 2007 15:55:24 -0000, magmike <ma******@yahoo.com>
wrote:

INSERT INTO SomeTable ( ID, SomeOtherField )
SELECT [Give ID:] AS Expr1, [Give SomeOtherField:] AS Expr2;

It would have said "Yo! Can't do that. There are related records in
other tables."
Just try it for yourself.

-Tom.
>got an example of the append query for changing the ID #?

If I had referential integrity setup (i'll need to research that),
what would have happened when I selected Delete Record?

mike

On Oct 12, 10:01 am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
>On Fri, 12 Oct 2007 14:34:26 -0000, magmike <magmi...@yahoo.com>
wrote:

If you haven't done anything else with the db, a data recovery service
may still be able to get it back for you. Of course you can recover it
from last night's backup as well.

Sounds like you violated rule #1 of database design, and did not have
referential integrity enforcement selected in the table relationships.
That would have prevented the accidental delete. Fix that!

Yes, you can create an append query and specify the value of your ID
field.

-Tom.
>Accidentally deleted a record. Anyway to get it back?
>If not, I know the ID number - which is an autonumber field. Because
of the related data from other tables, would I be able to create a new
record and make its ID number, that of the deleted record?
>Thanks!
>magmike- Hide quoted text -

- Show quoted text -

got an example of the append query for changing the ID #?
Oct 13 '07 #4
On Oct 12, 9:27 pm, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Fri, 12 Oct 2007 15:55:24 -0000, magmike <magmi...@yahoo.com>
wrote:

INSERT INTO SomeTable ( ID, SomeOtherField )
SELECT [Give ID:] AS Expr1, [Give SomeOtherField:] AS Expr2;

It would have said "Yo! Can't do that. There are related records in
other tables."
Just try it for yourself.

-Tom.
got an example of the append query for changing the ID #?
If I had referential integrity setup (i'll need to research that),
what would have happened when I selected Delete Record?
mike
On Oct 12, 10:01 am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Fri, 12 Oct 2007 14:34:26 -0000, magmike <magmi...@yahoo.com>
wrote:
If you haven't done anything else with the db, a data recovery service
may still be able to get it back for you. Of course you can recover it
from last night's backup as well.
Sounds like you violated rule #1 of database design, and did not have
referential integrity enforcement selected in the table relationships.
That would have prevented the accidental delete. Fix that!
Yes, you can create an append query and specify the value of your ID
field.
-Tom.
Accidentally deleted a record. Anyway to get it back?
If not, I know the ID number - which is an autonumber field. Because
of the related data from other tables, would I be able to create a new
record and make its ID number, that of the deleted record?
Thanks!
magmike- Hide quoted text -
- Show quoted text -
got an example of the append query for changing the ID #?- Hide quoted text -

- Show quoted text -
How could I change the ID (autonumber) of a current record?
Oct 19 '07 #5
On Oct 12, 9:27 pm, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Fri, 12 Oct 2007 15:55:24 -0000, magmike <magmi...@yahoo.com>
wrote:

INSERT INTO SomeTable ( ID, SomeOtherField )
SELECT [Give ID:] AS Expr1, [Give SomeOtherField:] AS Expr2;

It would have said "Yo! Can't do that. There are related records in
other tables."
Just try it for yourself.

-Tom.
got an example of the append query for changing the ID #?
If I had referential integrity setup (i'll need to research that),
what would have happened when I selected Delete Record?
mike
On Oct 12, 10:01 am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Fri, 12 Oct 2007 14:34:26 -0000, magmike <magmi...@yahoo.com>
wrote:
If you haven't done anything else with the db, a data recovery service
may still be able to get it back for you. Of course you can recover it
from last night's backup as well.
Sounds like you violated rule #1 of database design, and did not have
referential integrity enforcement selected in the table relationships.
That would have prevented the accidental delete. Fix that!
Yes, you can create an append query and specify the value of your ID
field.
-Tom.
Accidentally deleted a record. Anyway to get it back?
If not, I know the ID number - which is an autonumber field. Because
of the related data from other tables, would I be able to create a new
record and make its ID number, that of the deleted record?
Thanks!
magmike- Hide quoted text -
- Show quoted text -
got an example of the append query for changing the ID #?- Hide quoted text -

- Show quoted text -
What kind of WHERE statement could I use in the append query, to use a
current record, and change it's autonumber to a different (not already
existing) one?

Oct 19 '07 #6
On Oct 19, 12:18 pm, magmike <magmi...@yahoo.comwrote:
On Oct 12, 9:27 pm, Tom van Stiphout <no.spam.tom7...@cox.netwrote:


On Fri, 12 Oct 2007 15:55:24 -0000, magmike <magmi...@yahoo.com>
wrote:
INSERT INTO SomeTable ( ID, SomeOtherField )
SELECT [Give ID:] AS Expr1, [Give SomeOtherField:] AS Expr2;
It would have said "Yo! Can't do that. There are related records in
other tables."
Just try it for yourself.
-Tom.
>got an example of the append query for changing the ID #?
>If I had referential integrity setup (i'll need to research that),
>what would have happened when I selected Delete Record?
>mike
>On Oct 12, 10:01 am, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
>On Fri, 12 Oct 2007 14:34:26 -0000, magmike <magmi...@yahoo.com>
>wrote:
>If you haven't done anything else with the db, a data recovery service
>may still be able to get it back for you. Of course you can recover it
>from last night's backup as well.
>Sounds like you violated rule #1 of database design, and did not have
>referential integrity enforcement selected in the table relationships.
>That would have prevented the accidental delete. Fix that!
>Yes, you can create an append query and specify the value of your ID
>field.
>-Tom.
>Accidentally deleted a record. Anyway to get it back?
>If not, I know the ID number - which is an autonumber field. Because
>of the related data from other tables, would I be able to create a new
>record and make its ID number, that of the deleted record?
>Thanks!
>magmike- Hide quoted text -
>- Show quoted text -
>got an example of the append query for changing the ID #?- Hide quoted text -
- Show quoted text -

What kind of WHERE statement could I use in the append query, to use a
current record, and change it's autonumber to a different (not already
existing) one?- Hide quoted text -

- Show quoted text -
If you are using an autonumber field for ANYTHING meaningful in your
data structure you are messing up BIG time. Autonumber is NOT
designed to be a 'record number' or ANY meaningful what so ever. It
is ONLY used as a way to INTERANLLY identify a unique record. You
should NOT use autonumber to be things such as Record Number, PO
Number, Item Number, etc. It sounds like you are doing something of
the sort.

Oct 19 '07 #7
On Oct 21, 1:10 am, "Larry Linson" <boun...@localhost.notwrote:
Also, if you start to create a new
record and cancel it, that number will be "lost and gone forever like
Clementine of song and story"
Khalil Gibran wrote a poem about autonumbers.
I try to keep its theme in mind when working with them:

Your autonumbers are not your autonumbers.
They are the sons and daughters of Data's longing for uniqueness.
They come through you but not from you,
And though they are with you, yet they belong not to you.

Oct 21 '07 #8
"lyle" <ly************@gmail.comwrote
Khalil Gibran wrote a poem about autonumbers.
I try to keep its theme in mind when working with them:

Your autonumbers are not your autonumbers.
They are the sons and daughters of Data's longing for uniqueness.
They come through you but not from you,
And though they are with you, yet they belong not to you.
Very perceptive, that Khalil.
Oct 22 '07 #9
"DavidB" <je***@yahoo.comwrote
EXACTLY the reason that I always use RANDOM
for my autonumebr fields rather than sequential. This
way I am rid of even the appearance that the numbers
'mean' anything.
Appearance to whom? Surely not to the users... the occasion would truly be
a rare one for me to expose an Autonumber field. They are for internal use,
surrogate keys, and linking and none of those functions requires the user to
see them.

It's not neccessarily, always true, but it is a reasonable assumption that
after paying my rate, a client will likely get a competent contractor to
follow me, and a competent Access contractor should know that Autonumber
fields have no intrinsic meaning.

And, I certainly don't need a reminder. My first encounter with a client's
high-tempered-green-eyeshade-and-sleeve-garter accounting/bookkeeping type
over missing numbers in a sequence of AutoNumbers was quite enough to
impress on my memory forever: even if you think the person is knowledgeable
and won't be misled, you can and should avoid showing them Autonumbers.

Larry Linson
Microsoft Access MVP

Larry Linson
Microsoft Access MVP
Oct 23 '07 #10
On Oct 22, 9:09 pm, "Larry Linson" <boun...@localhost.notwrote:
"DavidB" <je...@yahoo.comwrote
EXACTLY the reason that I always use RANDOM
for my autonumebr fields rather than sequential. This
way I am rid of even the appearance that the numbers
'mean' anything.

Appearance to whom? Surely not to the users... the occasion would truly be
a rare one for me to expose an Autonumber field. They are for internal use,
surrogate keys, and linking and none of those functions requires the user to
see them.

It's not neccessarily, always true, but it is a reasonable assumption that
after paying my rate, a client will likely get a competent contractor to
follow me, and a competent Access contractor should know that Autonumber
fields have no intrinsic meaning.

And, I certainly don't need a reminder. My first encounter with a client's
high-tempered-green-eyeshade-and-sleeve-garter accounting/bookkeeping type
over missing numbers in a sequence of AutoNumbers was quite enough to
impress on my memory forever: even if you think the person is knowledgeable
and won't be misled, you can and should avoid showing them Autonumbers.

Larry Linson
Microsoft Access MVP

Larry Linson
Microsoft Access MVP
Agreed that end users should never see the autonumber. Indeed in my
work they never do. Also having been a green visor type in a previou
incarnation (for some reason i did audit work for 9 years), I know all
to well what they infer fro a 'missing' number. It is my normal
practice to assume nothing. So I don't assume that whoever takes over
my databases when I get hit by a bus is at any given level. In
addition since there (IMHO) is no specific benefit in using
incremental or a detriment to using sequential, I opt for the latter.
Probably more a matter of personal choice than anything else.
Oct 23 '07 #11
On Oct 23, 2:00 pm, DavidB <je...@yahoo.comwrote:
On Oct 22, 9:09 pm, "Larry Linson" <boun...@localhost.notwrote:


"DavidB" <je...@yahoo.comwrote
EXACTLY the reason that I always use RANDOM
for my autonumebr fields rather than sequential. This
way I am rid of even the appearance that the numbers
'mean' anything.
Appearance to whom? Surely not to the users... the occasion would truly be
a rare one for me to expose an Autonumber field. They are for internal use,
surrogate keys, and linking and none of those functions requires the user to
see them.
It's not neccessarily, always true, but it is a reasonable assumption that
after paying my rate, a client will likely get a competent contractor to
follow me, and a competent Access contractor should know that Autonumber
fields have no intrinsic meaning.
And, I certainly don't need a reminder. My first encounter with a client's
high-tempered-green-eyeshade-and-sleeve-garter accounting/bookkeeping type
over missing numbers in a sequence of AutoNumbers was quite enough to
impress on my memory forever: even if you think the person is knowledgeable
and won't be misled, you can and should avoid showing them Autonumbers.
Larry Linson
Microsoft Access MVP
Larry Linson
Microsoft Access MVP

Agreed that end users should never see the autonumber. Indeed in my
work they never do. Also having been a green visor type in a previou
incarnation (for some reason i did audit work for 9 years), I know all
to well what they infer fro a 'missing' number. It is my normal
practice to assume nothing. So I don't assume that whoever takes over
my databases when I get hit by a bus is at any given level. In
addition since there (IMHO) is no specific benefit in using
incremental or a detriment to using sequential, I opt for the latter.
Probably more a matter of personal choice than anything else.- Hide quoted text -

- Show quoted text -
I have been using auto numbers to create an output file to import into
a relational database. These numbers are used to batch file and create
tickets to pull material. I am still creating the database and was
reading your info and I might have duplicate values. I have created a
table with a number of "00001" and I do an append into the auto number
field of the primary table prior to importing the data and appending
the primary table with some queries which then is exported in the
proper format. I compact the database when it is opened so the numbers
will start over. This will create duplicate values if more than one
file is imported and the database has been closed. Is there a way to
loop the numbers from "00001" thru "1998" or even have a letter at
the begining.
Thanks.
Wayne

Oct 24 '07 #12
On Oct 24, 6:44 am, Wayne <lawayne.loesc...@navy.milwrote:
On Oct 23, 2:00 pm, DavidB <je...@yahoo.comwrote:


On Oct 22, 9:09 pm, "Larry Linson" <boun...@localhost.notwrote:
"DavidB" <je...@yahoo.comwrote
EXACTLY the reason that I always use RANDOM
for my autonumebr fields rather than sequential. This
way I am rid of even the appearance that the numbers
'mean' anything.
Appearance to whom? Surely not to the users... the occasion would truly be
a rare one for me to expose an Autonumber field. They are for internal use,
surrogate keys, and linking and none of those functions requires the user to
see them.
It's not neccessarily, always true, but it is a reasonable assumption that
after paying my rate, a client will likely get a competent contractor to
follow me, and a competent Access contractor should know that Autonumber
fields have no intrinsic meaning.
And, I certainly don't need a reminder. My first encounter with a client's
high-tempered-green-eyeshade-and-sleeve-garter accounting/bookkeeping type
over missing numbers in a sequence of AutoNumbers was quite enough to
impress on my memory forever: even if you think the person is knowledgeable
and won't be misled, you can and should avoid showing them Autonumbers.
Larry Linson
Microsoft Access MVP
Larry Linson
Microsoft Access MVP
Agreed that end users should never see the autonumber. Indeed in my
work they never do. Also having been a green visor type in a previou
incarnation (for some reason i did audit work for 9 years), I know all
to well what they infer fro a 'missing' number. It is my normal
practice to assume nothing. So I don't assume that whoever takes over
my databases when I get hit by a bus is at any given level. In
addition since there (IMHO) is no specific benefit in using
incremental or a detriment to using sequential, I opt for the latter.
Probably more a matter of personal choice than anything else.- Hide quoted text -
- Show quoted text -

I have been using auto numbers to create an output file to import into
a relational database. These numbers are used to batch file and create
tickets to pull material. I am still creating the database and was
reading your info and I might have duplicate values. I have created a
table with a number of "00001" and I do an append into the auto number
field of the primary table prior to importing the data and appending
the primary table with some queries which then is exported in the
proper format. I compact the database when it is opened so the numbers
will start over. This will create duplicate values if more than one
file is imported and the database has been closed. Is there a way to
loop the numbers from "00001" thru "1998" or even have a letter at
the begining.
Thanks.
Wayne- Hide quoted text -

- Show quoted text -
"00001" is a string not a number.

Oct 26 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: C Kirby | last post by:
I'm running a DB using MSDE (2000) that is interfaced by 2 different ades running on PCs with Access 2000 Runtime. One of the ADEs is a package accounting system that is very solid and stable, the...
9
by: Robert Schneider | last post by:
Hi to all, I don't understand that: I try to delete a record via JDBC. But I always get the error SQL7008 with the error code 3. It seems that this has something to do with journaling, since the...
10
by: DaveDiego | last post by:
I've had a user delete one of the client records, I do have a version of the DB with all records intact before the deletion occured. Whats the best approach to getting all the related records in...
5
by: Mike Turco | last post by:
What is the difference between creating relationships in the front-end vs. the back-end database? I was trying to create a relationship in a database front-end and noticed that I could not check...
1
by: iam247 | last post by:
Hi I am a relative beginner with SQL and ASP. With some help after previous posts I have a page which successfully requests querystrings from another page and deletes a record from an access...
11
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to...
5
by: BrianDP | last post by:
This is a strange one-- I have an Access 2K database with a split front end/back end. There are two tables in the back end - RFile and RLine. There is a one to many relationship from...
3
by: BrianDP | last post by:
I have a database with a split front end/back end. There is a key table in the back end called Catalog, and it is sort of a central key table for all sorts of things. It's a list of all the jobs...
1
by: heatguru | last post by:
An Access 2000/2003 database has a form containing a memo field. Periodically the value of the memo field will show as #Deleted while the record itself is fine. The #Deleted value interferes with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.