Results 1 to 2 of 2

Thread: Relationship

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    Relationship

    I have a InstructorDatabase.mdb file and it has to table.

    The first table is the InstructorInfo and its field name are the following:
    InstructorCode
    InstructorName
    Primary Key is the "Instructor Code"

    The second table is the InstructorData and its field names are the following (this has no primary key) :
    InstructorCode
    InstructorName
    Section
    Subject
    Schedule
    Attendance
    Recitation
    Assignment
    Quiz
    Exam

    I set the relation to "InstructorCode"

    In my VB.NET project, I add an OleDbDataAdapter1 using Microsoft 4.0 OLE DB Provider and use this SQL: (this configuration work)

    SELECT InstructorCode, InstructorName
    FROM InstructorInfo

    I add again a OleDbDataAdapter2 using Microsoft 4.0 OLE DB Provider and use this SQL: (this configuration doesn't work!)

    SELECT InstructorCode, InstructorName, Section, Subject, Schedule, Attendance, Recitation, Assignment, Quiz, Exam
    FROM InstructorData


    I encounter and error like this:

    The wizard detected the following problems when configuring the data adapter "OleDbDataAdapter2".

    Details:
    Generalted SELECT statemet.

    Unspecified error: E_FAIL(0x80004005)

    I hope you could help me with this problem. I want to use both of my table in my project but I can't do it? Kindly help me?
    Please check the project I attached with this thread to understand this more clearly...

    Thanks..
    Attached Files Attached Files

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This example about relations in ADO.NET .
    http://www.vbforums.com/showthread.p...hreadid=253655

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