Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Query Question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Query Question

 Post Reply Post Reply
Author
felix.akinyemi View Drop Down
Groupie
Groupie
Avatar

Joined: 09 December 2004
Location: United States
Status: Offline
Points: 113
Post Options Post Options   Thanks (0) Thanks(0)   Quote felix.akinyemi Quote  Post ReplyReply Direct Link To This Post Topic: Query Question
    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
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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


Edited by dj air - 21 April 2005 at 7:50am
Back to Top
felix.akinyemi View Drop Down
Groupie
Groupie
Avatar

Joined: 09 December 2004
Location: United States
Status: Offline
Points: 113
Post Options Post Options   Thanks (0) Thanks(0)   Quote felix.akinyemi Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post Posted: 21 April 2005 at 9:14am
Just try all the methods out until one works.
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post 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
Soft 4 web
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.