CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: AutoNumber

  1. #1
    Join Date
    Dec 1999
    Location
    Europe
    Posts
    27

    AutoNumber

    I have an Access 2000 database with a AutoNumber field (also PrimaryKey). The problem I have is that when I try to get a record I receive 0 from the AutoNumber field. Also, when I use the DataGrid control the coresponding column has only zeros.
    I use ADO.
    What could be the problem?
    Thanx.


  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: AutoNumber

    I remember reading an old copy of VBPJ (from early last year, I think), that mentioned this 'bug'. If I remember correctly, then it's a bug with the version of ADO that you use (of course, I could be wrong) - I think they mentioned that it was fixed in ADO2.1/2.5


    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

  3. #3
    Join Date
    Dec 1999
    Location
    Europe
    Posts
    27

    Re: AutoNumber

    I don't know about the bug, but I'm using ADO 2.1 and I've also found the problem. I had to set the Format property of the field to General Number in Access.
    Thanx anyway.


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured