Results 1 to 3 of 3

Thread: MS Access Autonumber

  1. #1
    Join Date
    Jan 2003
    Posts
    2

    MS Access Autonumber

    What datatype is the autonumber field in ms access in terms of java?

    is it an int.

    I need to perform a query based on the autonumber field which gives my records an ID each.

    Would i consider it to be a normal number?

    Could I set it text and then add a function that adds 1 to some static variable every time a new record is added?

    if so, how?

    Thanks

  2. #2
    Join Date
    Feb 2003
    Posts
    9
    you haven't specified what you're doing exactly, but the Autonumber field is a unique number to identify a field. Unless of course you're using a query linking multiple autonumber based tables in a Union query or something like that...

    It makes little sense to reindex the number to assign an ID if there is already one there?

  3. #3
    Join Date
    Feb 2003
    Posts
    102

    AutoNumber datatype

    A VB Long datatype = -2,147,483,648 to 2,147,483,647

    I think this is an integer in Java.

    OR

    a GUID (globally unique identifier).

    6F9619FF-8B86-D011-B42D-00C04FC964FF is an example of a guid.

    In Access 97 you can't change a field to an Autonumber.

    I am not sure about 2000 or XP. I doubt it.

    If you want to create your own Autonumber like Primary Key write a function to do so.

    As with the other poster I am confused as to your goal.

    HTH,

    Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •