Results 1 to 4 of 4

Thread: MSACCESS Relationships

  1. #1

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    57

    MSACCESS Relationships

    i'm having trouble with the relationships in VS when relating from long to Autonumber
    I got an answer that fields should be declared integer, but ACCESS explicity
    states that fields realting to autonumber must be delared long
    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: MSACCESS Relationships

    This is a terminology issue. In VB.NET a Short is a 16-bit, an Integer is a 32-bit value and a Long is a 64-bit value. In Access an Integer is a 16-bit value and a Long Integer is a 32-bit value. If you define a column's data type as Long Integer in Access then values from that column will be Integers, not Longs, when retrieved into your VB.NET app.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    May 2006
    Posts
    57

    Re: MSACCESS Relationships

    But VS doesnt let me establish relationship between the "long" field and autonumber
    How do i resolve it?

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: MSACCESS Relationships

    EXACTLY what are you doing and EXACTLY what is happening, because I have no problem creating a relation in the VS DataSet designer between two columns defined in Access as AutoNumber (Long Integer) and Number (Long Integer)? Presumably you are doing something different but if you don't tell us what it is then we can only guess. If you'd like su to help you with your problem then you don't want us to have to guess what it is, do you? Provide a FULL and CLEAR description of the problem.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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