James, a Yes/No field (also known as a bit field) can hold a bit - that's either a 1
or a 0. In your query, you are enclosing the value in single quotes. '1'. This is SQL
syntax for strings. So the DB driver thinks you are trying to put a string into a bit
field. This returns an error. Try removing the single quotes.
HTH,
Avi
At 04:12 PM 5/4/00 , you wrote:
>Heya all,
>
>I'm fairly new to all of this (though loving every minute!) and am stuck
>with an SQL problem. What I want to have happen is this:
>
>1. When the given entry is approved, the approved entry is written to a
>table (seperate from the source table)
>2. The entry in the original table is marked as approved.
>
>The database in an Access2000 db, and the field "checked" is a YES/NO
>type.
>
>My problem is, when I process the form, the new record is written to the
>second table just fine, but the original record is not marked as checked
>off, and the test of the page chokes with an error. I know my problem is
>in the SQL for the update, but I can't seem to get the expression right!
>Here's what I have:
>
><cfquery name="checkedrecord" datasource="timesheets">
>update timesheets
>set checked='1'
>where ID='#form.ID#'
></cfquery>
>
>I've tried =1, ="1", ='1', since the "Mastering ColdFusion 4" book states
>"When manipulating a Microsoft Access logical (YES/NO) field, use 1 for
>YES and 0 for NO." So I *should* be setting it to 1...right?...
>
>Is my problem my update query, or do I need to set a variable to use for
>the set command, or what? I'm sure there's an obvious answer right in
>front of me, but I'm stumped...
>
>Thanks in advance!
>James
>
>=======================
>James Mathieson
>[EMAIL PROTECTED]
>
>Kurtis & Associates, P.C.
>2000 M Street, N.W., Suite 600
>Washington, D.C. 20036
>(202) 328-4500 (voice)
>(202) 328-1231 (fax)
>--
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.