-
January 2nd, 2006, 08:27 PM
#1
International Boolean
When I make a call to a recordset with "select * FROM Table WHERE myfield = " & True I get an error from non-English computers. I then tried "select * FROM Table WHERE myfield = " & CBool(-1). I still get the error of too few parameters. These both work fine on English setting computers. What works internationally?
-
January 3rd, 2006, 01:08 AM
#2
Re: International Boolean
it depends on the DBMS but mostly a value 1 and 0 represents true and false respectively. so i thought you can write the statement as..?
"SELECT * FROM Table WHERE myfield = '1'"
or
"SELECT * FROM Table WHERE myfield = 1"
or
"SELECT * FROM Table WHERE myfield"
"SELECT * FROM Table WHERE myfield = '0'"
or
"SELECT * FROM Table WHERE myfield = 0"
or
"SELECT * FROM Table WHERE NOT myfield"
Busy
-
January 3rd, 2006, 10:15 AM
#3
Re: International Boolean
Just declare a boolean
Dim blnVal as boolean
blnVal = True 'or blnVal= False
rs.Open "SELECT * FROM Table WHERE myfiled=" & blnVal, db, adOpenStatic, adLockOptimistic
Give up your guns and face the law!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|