PDA

Click to See Complete Forum and Search --> : SQL Problem??


equuelus
Feb 19th, 2001, 11:10 PM
Greetings..

I have a problem with my sql. When i run the qeury it returns a "Type mismatch in expression" error.

Here's the code for your reference :


SELECT [Tutorials].[TutorialID], [Tutorials].[TutorialTitle], [Tutorials].[AuthorID], [Tutorials].[DatePosted], [Tutorials].[CourseID], [Teachers].[TeacherID], [Teachers].[LastName], [Courses].[CourseID], [Courses].[CourseName], [Courses].[CourseLevel]
FROM Courses INNER JOIN (Teachers INNER JOIN Tutorials ON [Teachers].[TeacherID]=[Tutorials].[AuthorID]) ON [Courses].[CourseID]=[Tutorials].[CourseID];


Is there anything wrong with the code? What I am trying to do is open a recordset that 3 tables has relations in.

Thanks for any help in advance.

Jerry Grant
Feb 20th, 2001, 04:14 AM
When you specify a join between two tables in a SELECT statement, the field data types must match.
Check that the following fields are the same type:
Teachers.TeacherID & Tutorials.AuthorID
Courses.CourseID & Tutorials.CourseID
The easiest way to check for a valid statement is in MSQuery (packaged with Excel), SQL Server Query Analyzer or use the Access Query builder.
This will identify this sort of problem before you get into code. :cool:

equuelus
Feb 20th, 2001, 04:20 AM
Thanks for all the reply guys..
another question. I have problem declaring the 'memo' datatype in ASP. I am using Ms Access for my database.
Anybody can help me with this please by providing me the code for it please..? :confused:

Jerry Grant
Feb 20th, 2001, 04:28 AM
In VBScript it is Dim myMemo
In JScript it is var myMemo
No need for anything else.
:cool:

equuelus
Feb 20th, 2001, 04:35 AM
i have solve that problem already thanks..
now i have another.. does memo reads the enter command?
i mean lets say the memo is made of several lines separated by the 'enter' thing.
Will the asp reads it as enter too displaying the same layout as in the database?

Thanks in advance.