Table Adapter Configuration Error

emaduddeen

Well-known member
Joined
May 5, 2010
Messages
171
Location
Lowell, MA & Occasionally Indonesia
Programming Experience
Beginner
Hi Everyone,

This query works fine in MS Access but when I try to use it to configure a query in the Table Adapter Configuration Wizard, it gives me an error stating the "=" is not recognized.

Can you tell me how to get it to recognize the "=" sign?

Here's the query:

VB.NET:
SELECT        Attendance.AttendanceID, Class.ClassId, Class.ClassName, Student.StudentId, LTRIM(Student.FirstName) & ' ' & LTRIM(Student.LastName) AS StudentName, 
                         Int((NOW() - Student.DOB) / 365.25) AS StudentAge, Parent.HomePhone, Parent.Email, Attendance.DateOfClass, 
Switch(Attendance.Absent=True,"*** ABSENT ***",Attendance.Absent=False,"") AS Absent, 
Class.GradeId
FROM            ((Class INNER JOIN
                         (Attendance INNER JOIN
                         Student ON Attendance.StudentID = Student.StudentId) ON Class.ClassId = Attendance.ClassId) INNER JOIN
                         Parent ON Student.ParentId = Parent.ParentId)
WHERE       (DateOfClass BETWEEN ? AND ?)

Thanks.

Truly,
Emad
 
first, replace it with this:

VB.NET:
SELECT     *
FROM            ((Class INNER JOIN
                         (Attendance INNER JOIN
                         Student ON Attendance.StudentID = Student.StudentId) ON Class.ClassId = Attendance.ClassId) INNER JOIN
                         Parent ON Student.ParentId = Parent.ParentId)
WHERE       (DateOfClass BETWEEN ? AND ?)

Be aware that the full range of functions in Access are not accessible from code(vb.net, vb6, c# etc - this is not a tableadapter restriction)

Only functions that the jet database engine supports are usable.

I'd advise not using access; it will become the greatest cause of your headaches
 
Back
Top