access checking of booleans in select statement

B

Brian Henry

if i have a table like this

ID Name Accessable
1 Me yes

in access with accessable as a yes/no field (or a boolean) how do i write a
statement in ado.net to check that? obviously yes or no wont work in a query
builder for criteria... it kicks it out...

i had select users.* from users where accessable = yes but that was kicked
out in vb.net useing the dataadapter's query builder... how do i check to
see if accessable is true in a select statement? thanks
 
J

Joe Fallon

Use True/False.
The Access Yes/No is just an alias for these regular commands.

You can also use the real values 0 is False and <>0 is True.
(Access uses -1 for True, SQL Server uses 1.)

e.g. If you want accessable = yes use:
accessable = True
or
accessable <> 0
 
B

Brian Henry

thanks

Joe Fallon said:
Use True/False.
The Access Yes/No is just an alias for these regular commands.

You can also use the real values 0 is False and <>0 is True.
(Access uses -1 for True, SQL Server uses 1.)

e.g. If you want accessable = yes use:
accessable = True
or
accessable <> 0
--
Joe Fallon
Access MVP



write
 

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

Top