Solved

HELP AGAIN

Posted on 2006-06-24
8
269 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
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
 
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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access question 11 59
Database connection opened on a machine 8 54
Update cached table in H2 database 6 44
Write Caching in the Cloud for VFP9 16 89
I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
This article describes some very basic things about SQL Server filegroups.
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…

864 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now