Solved

SQL Problem with Yes/No field in Access

Posted on 2006-07-23
3
234 Views
Last Modified: 2010-04-16
Hi,

I have added a column to ab Access table called "Active" and it's a Yes/No field.  It's part of my test environment so I can have completed records in the database that my program will ignore, until I check the checkbox to activate the record.

Oddly it works on some tables but not others.  When running in "TestMode" I add the following to each line of SQL.

" AND Active=1";

In other words I'm appending one final condition to my WHERE clause.  And like I said, it works on some tables but not others.  Any ideas?

Thanks,
Bob
0
Comment
Question by:ba272
3 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 17165857
Hi ba272,
----------

if it works on some tables and not on others, then why not try to deubg to the sql and run that query in the access query window to see if it returns the records you expect it could be several things so testing the sql that comes out of your program in the query window is a way to find out if its in the code or in the table you try to access

----------
bruintje
0
 
LVL 22

Accepted Solution

by:
Mohammed Nasman earned 500 total points
ID: 17165891
try

"and active = true"
0
 

Author Comment

by:ba272
ID: 17167387
mnasman,

That worked.  I had tried the following:

and active='true'

which didn't work as you'd expect, before I'd posted the question.

Thanks,
Bob
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

867 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

26 Experts available now in Live!

Get 1:1 Help Now