Boolean Problem

I've written some code that creates an sql statement in a string to update a boolean value in an access database, however, I dont know what value to give the field to update the boolean value in the access database.
I'll paste some of the code so it makes more sense.....
(note: the 'Booked' Field is the Boolean)

strSql = strSql & " UPDATE HolliesBookTbl SET Booked = '-1' WHERE "

'loop through the checkboxes which were ticked
for i = 0 to ubound(arrVals)
if i = 0 then
strSql = strSql & " DateID = '"& arrVals(i) &"'"
else
'only add the " AND " if this is not the first value
strSql = strSql & " AND DateID = '"& arrVals(i) &"'"
end if

I've been pullinhg my hair out over this

View Replies


ADVERTISEMENT

Boolean SQL Statement

I have a boolean field in an access database. I want to write an SQL statement which pulls out all records from the table MemberInfo where the field Online = true.

This is my code

sql = "Select * From MemberInfo Where online=true"

This doesn't work, do I need quotes around true?

View Replies View Related

Boolean Search Expressions?

I'm trying to add a search facility to a page that looks for matches in one,
other or both memo fields of a database. The code below works fine if the
visitor types in one word, or the term just happens to exist in one of the
queried fields.

What I'd really like is for a visitor to type in an expression, or query in
the same format as you would use in a search engine and it would find
appropriate matches. Any ideas how I can modify the code below to do this?

View Replies View Related

Boolean Variable Concatination

if a declare a variale say
Dim Flag
and assing it to true a boolean value
Flag = True
and if i try to concatinate it with another string like
mystr="<my-str>" & Flag & "</my-str>"
and if the machine is non english the mystr will contain something like
<my-str>that language characters</my-str>
what should i do to get True in mystr what ever the Language of windows is.

View Replies View Related

Pass Boolean Parameter To JS Function

I have a simple JS function that I want to return a true or false value based on the parameter passed in. At this point of time I receive the error "'True' is undefined". Here is my code:

View Replies View Related

Boolean Expression Not Being Eval'd Correctly?

I have some code that checks security permissions in a DB, and before my conditional statement that checks these permissions, I am writing out both values to see what the statement looks likebefore it is evaluated.

The problem is, it seems to disregard the condition and always returns True, even if the condition should be false...any ideas? I also did some testing to assure that the length of the two values I am comparing is 1, just in case they were possibly holding spaces, and I verified they are numeric as well. I am just stumped here...

Let me also preface this code snippet by saying, I am using this asp script to generate javascript menu choices...and I did include some commented debug statements so I can see what the javascript rendered.. Code:

View Replies View Related

Text File Boolean AND Search Problem

I trying to search a text file using a boolean AND search. What i want to happen is when a user types in type values to search e.g. Name Department (Taylor marketing) i want it to only read out the lines which contain both values.

At present it reads out all lines with Taylor in and all lines with marketing. The code i have so far is: Code:

View Replies View Related

Assigning A Boolean Of True Or False To VBScript Variable...

Is there a way I can assign a value of true or false to a VBScript variable? I have a function where I want to initiate a value of false: Would this work? Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved