473,327 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Type mismatch in expression

Hi,

I am a newbie to this forum and I want some help from you.

I want to extract some data using jdbc by connecting to the Ms-Access database. When I tried to extract the data from two tables using a query which involves the "join", I have faced a problem stating that "Type mismatch in expression".

But when I tried to retrieve the data from a single table using a simple query, the code is working fine.

Here I am posting my query:

String qry="select TT.PATENT_SK, TTD.STATE_NAME from TRACKER TT,TRACKER_DICT TTD where TT.KEY=TTD.KEY";

where I am joining two tables TRACKER and TRACKER_DICT to retrieve the columns PATENT_SK, STATE_NAME.

Any help in this regard will be appreciated and of great help to me and thanks alot in advance.
Jun 22 '07 #1
2 1925
JosAH
11,448 Expert 8TB
Hi,

I am a newbie to this forum and I want some help from you.

I want to extract some data using jdbc by connecting to the Ms-Access database. When I tried to extract the data from two tables using a query which involves the "join", I have faced a problem stating that "Type mismatch in expression".

But when I tried to retrieve the data from a single table using a simple query, the code is working fine.

Here I am posting my query:

String qry="select TT.PATENT_SK, TTD.STATE_NAME from TRACKER TT,TRACKER_DICT TTD where TT.KEY=TTD.KEY";

where I am joining two tables TRACKER and TRACKER_DICT to retrieve the columns PATENT_SK, STATE_NAME.

Any help in this regard will be appreciated and of great help to me and thanks alot in advance.
Are the types of both keys the same? Does the join work if you use another SQL
interface for MS-Access?

kind regards,

Jos
Jun 22 '07 #2
r035198x
13,262 8TB
Hi,

I am a newbie to this forum and I want some help from you.

I want to extract some data using jdbc by connecting to the Ms-Access database. When I tried to extract the data from two tables using a query which involves the "join", I have faced a problem stating that "Type mismatch in expression".

But when I tried to retrieve the data from a single table using a simple query, the code is working fine.

Here I am posting my query:

String qry="select TT.PATENT_SK, TTD.STATE_NAME from TRACKER TT,TRACKER_DICT TTD where TT.KEY=TTD.KEY";

where I am joining two tables TRACKER and TRACKER_DICT to retrieve the columns PATENT_SK, STATE_NAME.

Any help in this regard will be appreciated and of great help to me and thanks alot in advance.
Also (if you do decide to respond) what types are your keys?
Jun 22 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mark | last post by:
Hi - I tried this in VS.Net, and also in the Web Matrix code below: - but I am getting a type mismatch error. The sql statement runs perfectly from within the Access Query Designer. Can anyone...
6
by: Faz | last post by:
I am trying to do a simple query between two tables which come from an ODBC (oracle) database, so I cannot change the data type of these values. I am trying to do a join between a field...
1
by: ArcadeJr | last post by:
Good morning all! I have been getting a Run-time Error message #3464 - Data Type mismatch in criteria expression. While trying to run a query. I have a database where the field Asset_Number...
1
by: amitbadgi | last post by:
I am getting the following error while converting an asp application to asp.net Exception Details: System.Runtime.InteropServices.COMException: Data type mismatch in criteria expression. ...
6
by: shan | last post by:
What is the meaning for the error expression syntax and type mismatch error.I am using turbo c++.can anybody correct the errors in the folowing program. Following program is to find matrix...
2
by: igor.barbaric | last post by:
Hello! I have created a very simple query like this: SELECT Tasks.Name, DurationHrs(,) AS Duration FROM Tasks INNER JOIN Log ON Tasks.TaskID=Log.TaskID; The above query works fine....
2
by: psychomad | last post by:
Please, can someone help me out to solve this error, i've been searching throughout my codes and yet i didnt succeed in finding the error!!!! The Error is: Server Error in '/' Application....
19
by: Lysander | last post by:
I have written a query that takes three integers representing day,month and year, forms a date from them and compares this date to the date the record was entered and returns any records where the...
5
by: isoquin | last post by:
The below code throws the error: "Data type mismatch in criteria expression" Searching online didn't seem to offer me a solution. Public Sub update_by_EDD(myDate As Date, myMR As String) ...
22
by: Ruben | last post by:
Why would a method that is defined to return a reference such as with the operator overload of , operator, href& operator(int index){ return _array; } not cause a type mismatch compiler...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.