Print Page | Close Window

Query Question

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=14779
Printed Date: 29 March 2026 at 6:17pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Query Question
Posted By: felix.akinyemi
Subject: Query Question
Date Posted: 21 April 2005 at 7:33am

Just a lil question,

Dim x
x = 1
 
When adding to database in access you have to CBool(x) Is that the same as in MSSQL and MySQL or its just
 
rs.Fields("name") = x
 
or do i have to
 
rs.Fields("name") = CBool(x) in MS and MySQL



Replies:
Posted By: dj air
Date Posted: 21 April 2005 at 7:49am
if using the rs.update method then you can use CBool

but if updating through a query using insert INTO command you have to use

0 and 1 .. not true and false.


this is for MSSQL im not sure oin MySQL


Posted By: felix.akinyemi
Date Posted: 21 April 2005 at 8:00am

ok, im usin the .Update method.

how about delete from, is that CBool() as well or 0 and 1


Posted By: Gullanian
Date Posted: 21 April 2005 at 9:14am
Just try all the methods out until one works.


Posted By: zaboss
Date Posted: 21 April 2005 at 9:22am
I think the best is to stay out of Yes/No, true/false fields, especially in multi-db environments, but not only, just as a good coding practice.


-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web


Posted By: dj air
Date Posted: 21 April 2005 at 12:24pm
if using the update method you can use the CBool(value),

as the true can be read by the server, but not within the insert into method or any other that are simular.

DELETE, UPDATE, SELECT etc.

they have to be 0 = False or 1 = True



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net