General discussion

  • Creator
  • #2257422

    Data Tables giving me a migraine


    by ydobonmai ·

    I want to combine three tables of my database in one page and on submit want to update all three tables at the same time. Same goes for Edit and Delete. I am unable to do it. I am using a dataset and if i select columns from all three tables then it does display it but will not delete or do any other operations on it. It gives me a application error. This problem does not occur if i use just 1 table. with 3 tables it does not autogenerate the insert, delete and edit statements but the funny thing is that it displays it all right.
    the code is below:

    SELECT Students.Student_ID, Students.Salutation, Students.First_Name, Students.Last_Name, Students.Fathers_Name, Students.DOB, Students.Gender,
    Students.Nationality, Students.Caste, Students.Blood_Group, Students.DOR, Student_Address.SL_No, Student_Address.Student_ID AS Expr1,
    Student_Address.Address, Student_Address.City, Student_Address.Pincode, Student_Address.State, Student_Address.Country,
    Student_Address.Country_Code1, Student_Address.State_Code1, Student_Address.Phone1, Student_Address.Country_Code2,
    Student_Address.State_Code2, Student_Address.Phone2, Student_Address.Country_Code_Mob, Student_Address.State_Code_Mob,
    Student_Address.Mobile, Student_Address.Country_Code_Fax, Student_Address.State_Code_Fax, Student_Address.Fax, Student_Address.Email,
    Student_Details.SL_No AS Expr2, Student_Details.Student_ID AS Expr3, Student_Details.LAC_Board, Student_Details.LAC_Institution,
    Student_Details.Aggregate_PCB, Student_Details.Passport_No, Student_Details.PP_DOI, Student_Details.PP_DOE
    FROM Students INNER JOIN
    Student_Address ON Students.Student_ID = Student_Address.Student_ID INNER JOIN
    Student_Details ON Students.Student_ID = Student_Details.Student_ID

    Can someone please help me out.

All Comments

  • Author
    • #3215132

      Reply To: Data Tables giving me a migraine

      by maevinn ·

      In reply to Data Tables giving me a migraine

      Just a guess, but most often, if you’re unable to update records from multiple tables through the recordset, it’s because the tables aren’t joined appropriately. Try changing the order of the join, or the type of the join, and see if that makes any difference. If you have some records in Students that are not matched in the other tables, and outer join might resolve this issue.

Viewing 0 reply threads