Migrating Access Program to ASP have problems with Yes/No Field

A

A P

I am planning to migrate my exisiting MS Access program that uses yes/no
fields (checkbox). Can ASP identifies checkbox field of ms access? I am
planning to use the same database and use msacess for report generation and
web browser for encoding to the database.

Hope you could help me.

Me
 
D

David Morgan

The answer is yes.

When testing for 'yes' you would say

WHERE Field = 1

Or

WHERE Field = 'True'
 
A

A P

I tried to access certain field with Yes/No data type from MS Access but IE
gave me an error message:

Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.

What do I need to do?
 
R

Ray Costanzo [MVP]

It's hard to say without seeing what your query is, i.e.

Response.write sqlString
response.end

Try using:

where fieldname=true

instead of
where fieldname='true'
if that's what you were using.

Ray at home
 
A

A P

The error was gone but I think the query cannot find what I'm looking for.

SELECT * FROM tblform WHERE Served = True

Note that Served field is a Yes/No MS Access Data Type.

Me
 
B

Bob Barrows [MVP]

You need to use the numeric representations of true/false:
SELECT * FROM tblform WHERE Served = -1

Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top