Home All Groups Group Topic Archive Search About

SQL update statment, using ACCESS yes/no

Author
4 Jul 2006 6:04 AM
Bonzol
VB.net 2003, 1.1, webapplication
hey there connecting to an Access database.
There is a field in the database that is yes/no
What do I pass in to the datbase to make it check the box, or uncheck
it? I have tried "yes", "no", "true", "false", but i cant get it right

e.g
SQL = UPDATE Users SET Name = TRUE WHERE ID = 1

anyone got a clue?

Author
4 Jul 2006 6:40 AM
Bonzol
whhoops, never mind now
Author
4 Jul 2006 6:48 AM
R. MacDonald
Hello, Bonzol,

I also would have expected that SQL to work.  Perhaps the problem is
somewhere else.  Can you try running the query from directly within
Access?  That might provide a clue as to whether the problem is with the
  query or the web-app.

Cheers,
Randy


Bonzol wrote:

Show quoteHide quote
> VB.net 2003, 1.1, webapplication
> hey there connecting to an Access database.
> There is a field in the database that is yes/no
> What do I pass in to the datbase to make it check the box, or uncheck
> it? I have tried "yes", "no", "true", "false", but i cant get it right
>
> e.g
> SQL = UPDATE Users SET Name = TRUE WHERE ID = 1
>
> anyone got a clue?
>
Author
4 Jul 2006 10:26 AM
StuartJ
Try using 1 for true and 0 for false - that should work


R. MacDonald wrote:
Show quoteHide quote
> Hello, Bonzol,
>
> I also would have expected that SQL to work.  Perhaps the problem is
> somewhere else.  Can you try running the query from directly within
> Access?  That might provide a clue as to whether the problem is with the
>   query or the web-app.
>
> Cheers,
> Randy
>
>
> Bonzol wrote:
>
> > VB.net 2003, 1.1, webapplication
> > hey there connecting to an Access database.
> > There is a field in the database that is yes/no
> > What do I pass in to the datbase to make it check the box, or uncheck
> > it? I have tried "yes", "no", "true", "false", but i cant get it right
> >
> > e.g
> > SQL = UPDATE Users SET Name = TRUE WHERE ID = 1
> >
> > anyone got a clue?
> >