Solved

HELP AGAIN

Posted on 2006-06-24
8
274 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
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
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…

630 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