Re: [flexcoders] Re: how to insert checkbox value into database
For this problem to be solved, I think you need to find out what value is getting to Access. Something is reaching Access. What is it? On Mon, Nov 23, 2009 at 6:57 AM, stinasius wrote: > > > this is what i have tried to do following your previous example... > > private var poolSelected: Boolean = false; > > public function poolselected():void{ > if(pool.selected == true){ > poolSelected = 1; > } > > else{ > poolSelected = 0; > } > } > > private function insertHandler():void{ > listManager.listProperty(poolSelected); > > source="App.src.cfcs.propertyMaintenance" showBusyCursor="true"> > > fault="mx.controls.Alert.show(event.fault.faultString)"/> > > > fontSize="12" click="poolselected()"/> > > > -- Chris Downey http://www.vaccine-tlc.org/ http://www.chrisdowney.name/ http://code.google.com/p/vaccine-toxic-load-calculator/
[flexcoders] Re: how to insert checkbox value into database
this is what i have tried to do following your previous example... private var poolSelected: Boolean = false; public function poolselected():void{ if(pool.selected == true){ poolSelected = 1; } else{ poolSelected = 0; } } private function insertHandler():void{ listManager.listProperty(poolSelected);
Re: [flexcoders] Re: how to insert checkbox value into database
Ooops. By "pragmatically" I meant "programmatically" On Mon, Nov 23, 2009 at 12:30 AM, Chris Downey wrote: > I'm not sure how much my code examples will help - I'm using SQL Server and > before the data gets to SQL, I translate the boolean value to a 1 or 0. > > If I were in your shoes, the next thing I'd do is to figure out a way to > know the exact value that Access is getting. Make no assumptions. Consider > all the layers that single value is getting passed through. Can you send > the value from CF to an Access macro? What I'm getting at is, if this were > my problem and since I'm using SQL Server, I'd send the value to a stored > procedure where I could examine and test it. With Access, what options do > you have to pragmatically examine and test values sent from Cold Fusion? > > > > On Sun, Nov 22, 2009 at 8:03 AM, stinasius wrote: >> >> >> >> Chris Downey you said you do this all the time, care to show how exaclty >> you do it using the first example of itemWorking, or you can show how to >> directly send the checkbox.selected value to the data access object layer >> (via your RemoteObject). please this would be very helpful. >> >> _ > > -- > Chris Downey > http://www.vaccine-tlc.org/ > http://www.chrisdowney.name/ > http://code.google.com/p/vaccine-toxic-load-calculator/ > -- Chris Downey http://www.vaccine-tlc.org/ http://www.chrisdowney.name/ http://code.google.com/p/vaccine-toxic-load-calculator/
Re: [flexcoders] Re: how to insert checkbox value into database
I'm not sure how much my code examples will help - I'm using SQL Server and before the data gets to SQL, I translate the boolean value to a 1 or 0. If I were in your shoes, the next thing I'd do is to figure out a way to know the exact value that Access is getting. Make no assumptions. Consider all the layers that single value is getting passed through. Can you send the value from CF to an Access macro? What I'm getting at is, if this were my problem and since I'm using SQL Server, I'd send the value to a stored procedure where I could examine and test it. With Access, what options do you have to pragmatically examine and test values sent from Cold Fusion? On Sun, Nov 22, 2009 at 8:03 AM, stinasius wrote: > > > Chris Downey you said you do this all the time, care to show how exaclty > you do it using the first example of itemWorking, or you can show how to > directly send the checkbox.selected value to the data access object layer > (via your RemoteObject). please this would be very helpful. > > _ > -- Chris Downey http://www.vaccine-tlc.org/ http://www.chrisdowney.name/ http://code.google.com/p/vaccine-toxic-load-calculator/
[flexcoders] Re: how to insert checkbox value into database
Chris Downey you said you do this all the time, care to show how exaclty you do it using the first example of itemWorking, or you can show how to directly send the checkbox.selected value to the data access object layer (via your RemoteObject). please this would be very helpful.
RE: [SPAM] [SPAM] [flexcoders] Re: how to insert checkbox value into database
".flex ui the checkbox is checked then the checkbox is also checked in the access table." Yes, that is the theory, but you say it is not happening. "Boolean" is more of an abstract data type, not a database column data type. Does the Yes/no field expect a string containing "yes"/"no"? Or "true" /"false, or 1/0? Obviously you are not giving it what it wants. On the CF side, hard code some values until you see what is needed for the insert, then convert the Flex Boolean into that. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of stinasius Sent: Friday, November 20, 2009 12:57 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [SPAM] [flexcoders] Re: how to insert checkbox value into database yes/no is looking for a boolean value. when the checkbox in the flex ui is checked the value recorded in database is yes but remember yes/no in access is a checkbox in the database column so if in the flex ui the checkbox is checked then the checkbox is also checked in the access table and if its not checked in the flex ui then the same in access table.
[SPAM] [flexcoders] Re: how to insert checkbox value into database
yes/no is looking for a boolean value. when the checkbox in the flex ui is checked the value recorded in database is yes but remember yes/no in access is a checkbox in the database column so if in the flex ui the checkbox is checked then the checkbox is also checked in the access table and if its not checked in the flex ui then the same in access table.
RE: [SPAM] [flexcoders] Re: how to insert checkbox value into database
Sorry I don't know CF and it has been 20 years since I did any Access. But I suspect a data type problem. Exactly what is a "yes/no" field looking for? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of stinasius Sent: Thursday, November 19, 2009 10:03 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: how to insert checkbox value into database here is were it fails in my cfc i have the following INSERT INTO homes(pool) VALUES("#arguments.pool#") the column in the table is pool and the id of the check box in the flex ui is also pool. in flex i have the following private function insertHandler():void{ listManager.listProperty(pool.selected); } when i try to insert it gives "error: cant execute query". any thoughts on what i can do to insert the value of the check box into the database. by the way the datatype of pool in database table is yes/no. am using access. thanks
[flexcoders] Re: how to insert checkbox value into database
here is were it fails in my cfc i have the following INSERT INTO homes(pool) VALUES("#arguments.pool#") the column in the table is pool and the id of the check box in the flex ui is also pool. in flex i have the following private function insertHandler():void{ listManager.listProperty(pool.selected); } when i try to insert it gives "error: cant execute query". any thoughts on what i can do to insert the value of the check box into the database. by the way the datatype of pool in database table is yes/no. am using access. thanks
[flexcoders] Re: how to insert checkbox value into database
here is were it fails in my cfc i have the following INSERT INTO homes(pool) VALUES("#arguments.pool#") the column in the table is pool and the id of the check box in the flex ui is also pool. in flex i have the following private function insertHandler():void{ listManager.listProperty(pool.selected); } when i try to insert it gives "error: cant execute query". any thoughts on what i can do to insert the value of the check box into the database. by the way the datatype of pool in database table is yes/no. am using access. thanks
RE: [SPAM] [flexcoders] Re: how to insert checkbox value into database
Where is it failing? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of stinasius Sent: Monday, November 16, 2009 11:48 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: how to insert checkbox value into database yes am already using my app to input info into database, but for the value of the check box that is the one that isn't working.
[flexcoders] Re: how to insert checkbox value into database
yes am already using my app to input info into database, but for the value of the check box that is the one that isn't working.
Re: [flexcoders] Re: how to insert checkbox value into database
Is your app successfully putting any data into the database now, or is this the first attempt to get it working? On Mon, Nov 16, 2009 at 6:47 AM, stinasius wrote: > > > Tracy that's what i did but it does not work... > -- Chris Downey http://www.vaccine-tlc.org/ http://www.chrisdowney.name/ http://code.google.com/p/vaccine-toxic-load-calculator/
[flexcoders] Re: how to insert checkbox value into database
Tracy that's what i did but it does not work...
RE: [SPAM] [flexcoders] Re: how to insert checkbox value into database
I am not quite seeing the problem. A checkbox control has a "selected" property that is Boolean. The exact code that you need to pass to your method depends on the implementation of that method. It might be: listManager.listProperty(ctry_name.selectedItem, city.text, location.text, myCheckBox.selected); Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of stinasius Sent: Saturday, November 14, 2009 9:02 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: how to insert checkbox value into database sorry for being too slow... but can you please be a little more clear here is the code am using to do the inserting from a flex form into a database, please show me how i can use your code in here. thanks private function insertHandler():void{ listManager.listProperty(ctry_name.selectedItem, city.text, location.text);
[flexcoders] Re: how to insert checkbox value into database
sorry for being too slow... but can you please be a little more clear here is the code am using to do the inserting from a flex form into a database, please show me how i can use your code in here. thanks private function insertHandler():void{ listManager.listProperty(ctry_name.selectedItem, city.text, location.text);