This is driving me nuts so if anyone out there can help youll be on my Xmas card list for life!
This is the sql generated by the query builder for my oledbadapter:
This produces a missing operator error whilst trying to generate the dataset.
If I run the configure dataadapter wizard and amend the FROM statement to this:
It generates the SQL. But if i then attempt to preview the data the error message about missing operator appears again.
When I look at the SQL the FROM clause has been modified and the brackets removed.
The error appears in the Access query design grid too if the brackets are omitted but with the brackets the SQL returns the correct records.
Questions are why is the FROM clause being modified? And why do I get this error every time I try to include three tables in my SQL?
This is the sql generated by the query builder for my oledbadapter:
Code:
SELECT tblContracts.po_number, tblContracts.price, tblJobs.active, tblJobs.comments, tblJobs.dated, tblJobs.engineer, tblJobs.grn_no, tblJobs.hours,
tblJobs.invoice_amount, tblJobs.invoice_date, tblJobs.invoice_no, tblJobs.jobdone, tblJobs.reference, tblJobs.sequence, tblJobs.type,
tblContracts.Supplierid, tblContracts.contractid, tblContracts.order_line, tblContracts.pr_number, tblJobs.jobid, tblJobs.duedate, tblEquipment.model,
tblEquipment.serial, tblEquipment.type AS equipmenttype
FROM tblJobs INNER JOIN
tblContracts ON tblJobs.contractid = tblContracts.contractid INNER JOIN
tblEquipment ON tblContracts.equipmentid = tblEquipment.equipmentid
This produces a missing operator error whilst trying to generate the dataset.
If I run the configure dataadapter wizard and amend the FROM statement to this:
Code:
FROM (tblJobs INNER JOIN
tblContracts ON tblJobs.contractid = tblContracts.contractid) INNER JOIN
tblEquipment ON tblContracts.equipmentid = tblEquipment.equipmentid
It generates the SQL. But if i then attempt to preview the data the error message about missing operator appears again.
When I look at the SQL the FROM clause has been modified and the brackets removed.
The error appears in the Access query design grid too if the brackets are omitted but with the brackets the SQL returns the correct records.
Questions are why is the FROM clause being modified? And why do I get this error every time I try to include three tables in my SQL?