Solved

HELP AGAIN

Posted on 2006-06-24
8
273 Views
Last Modified: 2008-02-01
Both of my fields c.userid and o.userid are text fields but I keep getting a mismatched criteria error, but If i change them to number fields the form works.  But by doing that I mess up my entire site.  So how do I write this so that the text fields c.userid and o.userid work in this query

this is my query

SELECT c.*, o.userid, o.company
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = MMColParam AND c.userid = o.userid AND NXTFilter
ORDER BY c.pmdate DESC

Thank You
0
Comment
Question by:budgilbert67
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 

Author Comment

by:budgilbert67
ID: 16975164
By the way My pages are asp vbscript and my database is microsoft access
0
 
LVL 32

Expert Comment

by:awking00
ID: 16975226
>> AND NXTFilter<< what? Equals something, is null?
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 16975715
WHERE c.userid = MMColParam  <---is MMColParam text as well?
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 16975759
>> >> AND NXTFilter<< what? Equals something, is null?<<
It is a boolean, as in True/False.
0
 

Author Comment

by:budgilbert67
ID: 16976036
SELECT c.*, o.*
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = MMColParam AND c.company = o.customer_ID AND NXTFilter
ORDER BY c.pmdate DESC

MMColParam       29          Session("kt_login_id")
NXTFilter
0
 

Author Comment

by:budgilbert67
ID: 16976047
SELECT c.*, o.*
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = MMColParam AND c.company = o.customer_ID AND NXTFilter
ORDER BY c.pmdate DESC

MMColParam           29       Session("kt_login_id")
NXTFilter               1=1       Session("filter_tfi_listRecordset37")

You guys are great for trying to help me.   the problem is related to o.customer_ID because if I point this to another field this query works.  If I change c.userid to a number field this query works.  The problem is if I change it to a number field I will have to redo about twent pages.   I don't want to have to do that.  by the way this is my first attempt to use a link.
0
 
LVL 3

Accepted Solution

by:
cdemir earned 500 total points
ID: 16976347
why don't you change "MMColParam"s type from integer to string like that :

 SELECT c.*, o.*
FROM paymaker AS c, freelance_customers AS o
WHERE c.userid = 'MMColParam' AND c.company = o.customer_ID AND NXTFilter
ORDER BY c.pmdate DESC


i think your problem is "data type incompatibly".

0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 16976422
I think you can change them to numeric just for this query using the Val() option.

WHERE Val(c.userid) = Val(MMColParam) AND c.company = o.customer_ID AND NXTFilter

something like that.
J

0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question