Renumbering MS db ID?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mr. B (User_at_NoWhere.com)
Date: 08/15/04


Date: Sun, 15 Aug 2004 16:31:02 GMT

I have a small MS db which I update daily with new info. I've noticed that
the ID numbers are increasing sequentially. How can I reset them back to 1
when I purge my data prior to adding in the new stuff?

Here is how I'm currently deleting the info from my db (TSUpdate):

  Private Sub ClearMyData()
    ' Open Connection and Clear Data
    OleDbConnection1.Open()
    Dim MyCommand As New OleDbCommand("DELETE FROM TSUpdate",
OleDbConnection1)
    MyCommand.ExecuteNonQuery()
    OleDbConnection1.Close()
    MyCommand.Dispose()
  End Sub

Thanks in advance!

Bruce



Relevant Pages

  • Renumbering MS db ID?
    ... How can I reset them back to 1 ... when I purge my data prior to adding in the new stuff? ... End Sub ... Bruce ...
    (microsoft.public.dotnet.framework.adonet)
  • Renumbering MS db ID?
    ... How can I reset them back to 1 ... when I purge my data prior to adding in the new stuff? ... End Sub ... Bruce ...
    (microsoft.public.data.ado)
  • Re: Renumbering MS db ID?
    ... when I purge my data prior to adding in the new stuff? ... Private Sub ClearMyData() ... Dim MyCommand As New OleDbCommand("DELETE FROM TSUpdate", ... How to reset an AutoNumber field value in Access ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Renumbering MS db ID?
    ... when I purge my data prior to adding in the new stuff? ... Private Sub ClearMyData() ... Dim MyCommand As New OleDbCommand("DELETE FROM TSUpdate", ... How to reset an AutoNumber field value in Access ...
    (microsoft.public.vb.database.ado)
  • Re: Renumbering MS db ID?
    ... when I purge my data prior to adding in the new stuff? ... Private Sub ClearMyData() ... Dim MyCommand As New OleDbCommand("DELETE FROM TSUpdate", ... How to reset an AutoNumber field value in Access ...
    (microsoft.public.data.ado)