Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Data type mismatch in criteria expression
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Data type mismatch in criteria expression

 Post Reply Post Reply
Author
skincla View Drop Down
Newbie
Newbie


Joined: 16 April 2003
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote skincla Quote  Post ReplyReply Direct Link To This Post Topic: Data type mismatch in criteria expression
    Posted: 17 April 2003 at 8:52am

I have an Access database with these tables and settings:

Keyword
* Keyword_ID (Autonumber)
Keyword (text)

DocumentKeyword
* Document_ID (long integer)
* Keyword_ID (long integer)

Document
* Document_ID (Autonumber)
Title (text)
Author (text)
Location (text)

DocumentTopic
* Document_ID (long integer)
* Topic_ID (long integer)

Topic
* Topic_ID (Autonumber)
Topic (text)

UserTopic
* User_ID (long integer)
* Topic_ID (long integer)

User
* User_ID (Autonumber)
Username (text)
Password (text)
Security_ID (text)
Email (text)

Then I set up a query table which made the SQL code:

SELECT [Document].[Document_ID], [Topic].[Topic_ID], [Document].[Title], [Document].[Author], [Document].[Location], [Topic].[Topic]
FROM (Document INNER JOIN DocumentTopic ON [Document].[Document_ID]=[DocumentTopic].[Document_ID]) INNER JOIN Topic ON [DocumentTopic].[Topic_ID]=[Topic].[Topic_ID];

I am concerned about the square brackets (or whatever they are called), when I take them out they appear again next time I open the query.

Anyway all the ASP pages that use this query say "Data type mismatch in criteria expression"

Any pointers would be much appreciated.
Thanks
Sara

Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2003 at 1:23pm
first off.. dont worry about the brackets.. they arent hurting anything...

second, that error means you are trying to compare two cols that are of different data types

how about that, the error told you exactly what was wrong :).. recheck your "topic_id"'s to make sure they all are of the same type
Contribute to the working anarchy we fondly call the Internet
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.