Ask a Question related to ASP Database, Design and Development.
-
McKirahan #1
DELETE table and reset AutoNumber
I'm using MS-Access and was wondering if there's a way to DELETE a table and
reset the primary key which is an AutoNumber field.
If I do "DELETE FROM table_name" then all the rows are removed but the
AutoNumber isn't initialized; thus, the next the AutoNumber field after the
next INSERT is not 1.
Thanks in advance.
McKirahan Guest
-
Delete form - Post data to a table and delete uponsubmit.
I have a delete form that I'd like to post the data to a table (delete_pcn) and delete upon submit, so that all deletions may be kept track of in... -
How do you Reset the palletes in Windows XP? Delete the aiprefs?
I'm not a usual PC user... but ocassionally do work on a PC. The layers pallete is off the screen. Tried resizing the monitor resolution to no... -
Problem inserting a autonumber value from a recordset to another table as text
The problem I'm having is I'm trying to insert a number value (UserID) obtained from the first SQL1 query from a table called User. In the Access... -
Delete key doesn't delete when datagrid is bound to a disconnected table
(Re: WinForm Datagrid) I manually built a table instead of filling it from a datasource. I bound my datagrid to the table. The datagrid works great.... -
How to delete or reset Mozilla default printer
I'm running Debian testing with Mozilla 1.0. I installed and ran mozilla before I had my printing system setup. Probably because of this, it now... -
Bob Barrows [MVP] #2
Re: DELETE table and reset AutoNumber
McKirahan wrote:
This is a frequently-asked question in the Access newsgroups (where it> I'm using MS-Access and was wondering if there's a way to DELETE a
> table and reset the primary key which is an AutoNumber field.
>
> If I do "DELETE FROM table_name" then all the rows are removed but the
> AutoNumber isn't initialized; thus, the next the AutoNumber field
> after the next INSERT is not 1.
>
> Thanks in advance.
should have been asked <grin>)
The easiest way is to compact the database after the deletion..
Another way is to change the field to Number and back to AutoNumber.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows [MVP] Guest
-
McKirahan #3
Re: DELETE table and reset AutoNumber
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:#b7GbZMeEHA.1000@TK2MSFTNGP12.phx.gbl...> McKirahan wrote:>> > I'm using MS-Access and was wondering if there's a way to DELETE a
> > table and reset the primary key which is an AutoNumber field.
> >
> > If I do "DELETE FROM table_name" then all the rows are removed but the
> > AutoNumber isn't initialized; thus, the next the AutoNumber field
> > after the next INSERT is not 1.
> >
> > Thanks in advance.
> This is a frequently-asked question in the Access newsgroups (where it
> should have been asked <grin>)
>
> The easiest way is to compact the database after the deletion..
>
> Another way is to change the field to Number and back to AutoNumber.
>
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
You're a god!
Compacting after deleting and before inserting works great.
Sorry for posting in the wrong ng; it's just that it was a "db" question and
I monitor this ng.
McKirahan Guest



Reply With Quote

