Problem using a checkbox in a DB update. Please help

Hello;
I am writting a little application as a type of control. I am
using a checkbox as lets say an on off switch. All my pages work
nice up to the point of turning the check off, or taking it away so
the BD table field is blank. I get an error when I uncheck the box
and hit update. Can anyone help me? I will attach my code, here is
the error I get:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC
Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in
UPDATE statement.
The error occurred in
C:\websites\108392zj7\sound\sound_RecordAction.cfm: line 9
7 : <cfif ParameterExists(Form.btnEdit_OK)>
8 : <cfif ParameterExists(Form.RecordID)>
9 : <cfupdate datasource="#sitedatasource#"
username="#siteUserID#" password="#sitePassword#" tableName="sound"
formFields="#Form.FieldList#">
10 : <cflocation url="sound_RecordView.cfm">
11 : </cfif></cfif>
SQL update sound set on= (param 1) where ID= (param 2)
DATASOURCE csee
VENDORERRORCODE -3503
SQLSTATE 42000
attached is the code for the 3 pages I am using to run this
little app for now. (Will be condensing it down to 1 or 2 pages
soon.
Please help, I have been looking at this code for 2 days now
and can't get it to function properly.
Phoenix

I did change the code on the edit page with a soundOn field.
here is the code:
<html><head>
<title>sound - Edit Record</title>
</head><body bgcolor="#FFFFFF">
<font size="+1">sound</font> <br>
<font size="+2"><b>Edit
Record</b></font>
<cfoutput>
<form action="sound_RecordAction.cfm" method="post">
<input type="hidden" name="FieldList"
value="#FormFieldList#">
<cfif isDefined("URL.RecordID")>
<input type="hidden" name="RecordID"
value="#URL.RecordID#">
<input type="hidden" name="ID" value="#URL.RecordID#">
</cfif>
<table>
<tr>
<td valign="top"> on: </td>
<td>
<input type="checkbox" name="soundOn"
value="#soundOn_Value#">
</td>
</tr>
</table>
<input type="submit" name="btnEdit_OK" value=" OK ">
<input type="submit" name="btnEdit_Cancel"
value="Cancel">
</form>
</cfoutput>
</body>
</html>
It still isn't changing the db record though. here is the
rest of the code:
INDEX PAGE:
<cfquery name="soundRecord" dataSource="csee"
maxRows=1>
SELECT sound.soundOn AS ViewField1, sound.ID AS ID_Field
FROM sound
<cfif isDefined ("URL.RecordID")>
WHERE sound.ID = #URL.RecordID#
</cfif>
</cfquery>
<html>
<head>
<title>sound - View Record</title>
</head>
<body bgcolor="#FFFFFF">
<cfoutput query="soundRecord">
<table>
<tr>
<td width="66" align="left" valign="top"> <font
size="2" face="Verdana, Arial, Helvetica, sans-serif">Sound
is:</font></td>
<td width="114" align="left" valign="top"><font
size="2" face="Verdana, Arial, Helvetica, sans-serif"><cfif
ViewField1 eq
0>off<cfelse>on</cfif></font></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><form
action="sound_RecordAction.cfm" method="post">
<input type="hidden" name="RecordID"
value="#ID_Field#">
<input type="submit" name="btnView_Edit" value=" Turn
sound off ">
</form></td>
</tr>
</table>
</cfoutput>
</body>
</html>
And action page:
<cfif isDefined("Form.btnEdit_OK")>
<cfif isDefined("Form.RecordID")>
<cfparam name="form.soundOn" default="0">
<cfquery datasource="#sitedatasource#"
username="#siteUserID#" password="#sitePassword#">
UPDATE sound
SET soundOn = <cfqueryparam value="#form.soundOn#"
cfsqltype="cf_sql_bit">
WHERE ID = <cfqueryparam value="#form.RecordID#"
cfsqltype="cf_sql_integer">
</cfquery>
<cflocation
url="sound_RecordView.cfm?RecordID=#Form.RecordID#">
</cfif></cfif>
The first code is page 2, the edit page. Don't know why it
isn't changing the DB record.
Phoenix

Similar Messages

  • I just factory restored my iPod 5 touch and when I plug it into iTunes to restore the back up I made, iTunes becomes unresponsive and closes. But when I unplug the iPod, it starts working again. Using Windows 8 and iTunes is updated, please help.

    I just factory restored my iPod 5 touch and when I plug it into iTunes to back it up, iTunes stops responding and closes. This only occurs when the iPod is plugged in, when it isn't, iTunes works fine. I am using Windows 8 and iTunes is updated (as of this posting). Any suggestions on getting around this? Thank you.

    Also, when I put it through the Windows diagnostic, it lists an "incompatible program" WHILE my iPod is plugged in.

  • SOS problem using one Entity bean for editing records. please help me

    Hello
    I have one great problem using one entity bean 2.1 and i am working with this problem several days and i dont solve it.
    i am using this jb 2.1 for add new records to one oracle database and for editing records.
    I have one great problem for editing records
    I have one objets that is as one of my database table. (PersonaObj.java)
         //personaObj.java
         public class PersonaObj implements Serializable{
              private Integer id_persona; //this ishte database table autonumeric
              private java.lang.String nombre;
              now the set/get methods.
         One field of this objets (bean) is the primary key of the table, and this field is one part of the pk from the entity bean.
         From one session bean i call the entity bena passing the objet
         into the entity bean (interface) i have one methods:
              public getPersona getT56aaat04();
         public void setPersona(PersonaObj obj);
         into the entitybean bean i have:
         public PersonaEntityPK ejbCreate(PersonaObj obj) throws CreateException {
              this.setT56aaat04(obj);
              public abstract Integer getId_persona();
         public abstract void setId_persona(Integer Id_persona);
         public abstract java.lang.String getNombre();
         public abstract void setNombre(java.lang.String Nombre);
         public PersonaObj getPersona() {
              PersonaObj obj = new PersonaObj();
              obj.setId_persona(getId_persona());
              obj.setNombre(getNombre());
              return obj;
         public void setPersona(PersonaObj obj) {
              setId_persona(obj.getId_persona());
              setNombre(obj.getNombre());
    But i have one graet problem.
    adding new record to the database i runs well but if i want to edit one recor appears this error:
    => Error <=
    java.rmi.RemoteException: EJB Exception: ; nested exception is: javax.ejb.EJBException: EJB Exception: : java.lang.IllegalStateException:[EJB:010144]The setXXX method for a primary key field may only be called during ejbCreate.
    at PersonasEJB_a43o8n__WebLogic_CMP_RDBMS.setId_persona(PersonasEntityEJB_a43o8n__WebLogic_CMP_RDBMS.java:328)
    at PersonasEntityBean.setPersona(PersonasEntityBean.java:114)
    at PersonasEntityEJB_a43o8n_ELOImpl.setPersona(PersonasEntityEJB_a43o8n_ELOImpl.java:45)
    at PersonasSessionBean.editarPersona(PersonasSessionBean.java:849)
    at PersonasSessionBean_bszo9t_EOImpl.editarPersona(PersonasSessionBean_bszo9t_EOImpl.java:208)
    at PersonasSessionBean_bszo9t_EOImpl_WLSkel.invoke(Unknown Source)
    into the session bean i make this (the session recibes one PersonaObj obj):
    T56aContactosEntityLocal personaLocal ;
                   try {
                        personaLocal = personaHome.findByPrimaryKey(new T56aContactosEntityPK(obj.getId_a04()));
                        T56aaat04Obj objTmp = new T56aaat04Obj();
                        objTmp.setAp1_a04(obj.getAp1_a04());
                        objTmp.setEstado_a04("false");
                        personaLocal.setT56aaat04(obj);
    Please can you help me to solve this problem?

    Hello Werner,
    The mappings seem to be alright at a first glance.
    Have you tried out un- and redeploying your application? Sometimes values appear to be cached in the server. So if you have deployed the application before you entered DB_BANK as alias this might solve the problem...
    BR
    Daniel

  • Problem using java crypto class... Please help me

    Hi, i'm trying to do application that send information via socket, and i have to send the data encrypted,
    i`m trying to implemented the RC4 algorithm.... I read an article that said that the java sdk 1.4 has already
    implemented the securities classes. So I made this little program:
    import javax.crypto.spec.*;
    import javax.crypto.*;
    import java.security.*;
    import java.io.*;
    public class MicroRC4
    public void encriptaClavePublica(String trama)
    Cipher rc4Cipher;
    byte[] rc4KeyByte;
    SecretKey rc4Key;
    String keyStr;
    String messageEncryp;
    byte[] messageEncrypByte;
    rc4Key = null;
    messageEncryp = trama;
    // Clave para encriptar el mensaje
    keyStr = new String();
    keyStr = "12345678";
    rc4KeyByte = new byte[8];
    messageEncrypByte = new byte[255];
    for(int i=0; i < 8; i++)
    rc4KeyByte[i] = (byte)keyStr.charAt(i);
    try
    for(int i=0; i < messageEncryp.length(); i++)
    messageEncrypByte[i] = (byte)messageEncryp.charAt(i);
    rc4Key = (SecretKey)new SecretKeySpec(rc4KeyByte, "RC4");
    rc4Cipher = Cipher.getInstance("RC4");
    rc4Cipher.init(Cipher.ENCRYPT_MODE, rc4Key);
    byte[] result = null;
    result = rc4Cipher.doFinal(messageEncrypByte);
    System.out.println("Usage:"+result);
    catch(Exception e)
    System.out.println(" Error: " + e.getMessage());
    System.out.println("\n........................................\n");
    I don't know what is wrong but when i run the application it show me the following message :
    Error: Algorithm RC4 not available
    Does anybody know what is wrong ??
    Does anybody can help me ??
    or tell me when can i find some source code that implement de RC4 algorithm
    Thank's in advance..
    Alejandro.

    Hi Alejandro,
    In the ends i decided to implement the algorithm by
    myself, i did it... any way thank's again.... If
    anybody want to see the code, send me a mail......
    AlejandroCan I also get the source code? my email id is [email protected]
    Thanks a lot!
    Srik.

  • After updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid

    after updating my Macbook Pro retina display to os x yosemite 10.10.2, the mause and track pad locks, and do not respond especially when using the Mac for a long period, please help, how can I solve this, I do not like feel like in windows, so I paid good money for this mack, I feel calm

    Hi Buterem,
    I'm sorry to hear you are having issues with your MacBook Pro since your recent Yosemite update. I also apologize, I'm a bit unclear on the exact nature of the issue you are describing. If you are having intermittent but persistent responsiveness issues with your mouse or trackpad, you may want to try using Activity Monitor to see if these incidents correspond to occupied system resources, especially system memory or CPU. You may find the following article helpful:
    How to use Activity Monitor - Apple Support
    If the entire system hangs or locks up (for example, if the system clock freezes and stops counting up), you may also be experiencing some variety of Kernel Panic. If that is the case, you may also find this article useful:
    OS X: When your computer spontaneously restarts or displays "Your computer restarted because of a problem." - Apple Support
    Regards,
    - Brenden

  • Using Firefox, I am unable to do my microsoft windows updates, please help!

    I just downloaded Firefox, and I am unable to do my Microsoft updates, please help!
    == This happened ==
    Every time Firefox opened
    == I downloaded Firefox today

    Use IE for Microsoft updates. MS updates use AciveX, which Firefox doesn't support.

  • Im having problem setting up my Hotmail account, it used to work fine until few days ago. It says ive entered an incorrect username or password which i can sign in fine with them details if i use laptop or safari through the phone, Please help..

    Im having problem setting up my Hotmail account, it used to work fine until few days ago. It says ive entered an incorrect username or password which i can sign in fine with them details if i use laptop or safari through the phone, Please help..

    I Sugges you to log into your hotmail acc and go to security and password change bit, then you will see two-step verification.. turn that off and you will be able to set it up on your iPhone/iPad or even Mac.
    Give your phone a restart before trying to set it up. Thanks

  • Using iweb 11 I can no longer publish site updates, please help.

    I am using iweb 11 and Lion and I can no longer publish site updates, please help.

    What a brilliant solution, Roddy.  Never would have thought of that.

  • How do i update my camera raw? I can not find the download update I've just brought a new d4s and I'm using the iMac with cs6 version. PLEASE HELP..

    How do i update my camera raw? I can not find the download update I've just brought a new d4s and I'm using the iMac with cs6 version. PLEASE HELP..

    The Adobe auto updater is pretty decent in CS6.  Just go to the Photoshop Help menu > Updates.
    You will be able to update ACR, Photoshop and Bridge right there, if there are in fact updates available.

  • I have treated photos in final cut using effects. The problem is I can not export them. Please help me. Thank you-

    I have treated photos in final cut using effects. The problem is I can not export them. Please help me. Thank you-

    Ernest,
    This is how I do it: With all the video & still's in the time line, I click on each (even if I have to use the command key and click on each file). When each file is active I go under SHARE- go to EXPORT MEDIA- I use the Apple Pro Res codec 4:2:2. If you do not click on each file in the time line it will not be exported out.
    Hope this helps.

  • People Please help, I forgot my security questions answers but I know how to reset them but the problem is my rescue email is not longer used ( DELETED ) so what can I do please help me

    People Please help, I forgot my security questions answers but I know how to reset them but the problem is my rescue email is not longer used ( DELETED ) so what can I do please help me??????????

    EZZTHEKILLER wrote:
    is there any other way ...
    Not in your case.
    EZZTHEKILLER wrote:
    I forgot my security questions answers but I know how to reset them but the problem is my rescue email is not longer used ( DELETED )

  • My App Store won't allow me to download any apps. It says such and such app is unable to download try again later  every time. I have enough storage all my devices are up to date on all updates  please help

    My App Store won't allow me to download any apps. It says such and such app is unable to download try again later  every time. I have enough storage all my devices are up to date on all updates  please help

    I am a librarian at a 1:1 iPad school and we are having this problem with all ~3000 student iPads as well at ~300 teacher iPads.  This is extremely frustrating.  I have tried suggested fixes found on other discussion boards but none have worked.

  • TS1814 I have windows vista and this did not work for my ipod it still will not update PLEASE HELP!

    I have windows vista and this did not work for my ipod it still will not update PLEASE HELP!
    iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server

    Try this:
    Close your iTunes,
    Go to command Prompt -
    (Win 7/Vista) - START/ALL PROGRAMS/ACCESSORIES, right mouse click "Command Prompt", choose "Run as Administrator".
    (Win XP SP2 n above) - START/ALL PROGRAMS/ACCESSORIES/Command Prompt
    In the "Command Prompt" screen, type in
    netsh winsock reset
    Hit "ENTER" key
    Restart your computer.
    If you do get a prompt after restart windows to remap LSP, just click NO.
    Now launch your iTunes and see if it is working now.
    If you are still having these type of problems after trying the winsock reset, refer to this article to identify which software in your system is inserting LSP:
    iTunes 10.5 for Windows: May see performance issues and blank iTunes Store
    http://support.apple.com/kb/TS4123?viewlocale=en_US

  • Hello i am rajesh i am having problem while conveting other files into pdf format please help me

    i am rajesh i am having problem while converting other files into acrobat format please help me

    Hello Rajesh,
    I'm sorry to hear you're having trouble. Are you using Acrobat.com to convert your files to PDF? Please let me know where you are having trouble and I will do my best to help you convert your files. For your reference, here is a list of filetypes that can be converted to PDF online with Acrobat.com:
    http://kb2.adobe.com/cps/524/cpsid_52456.html#Create%20PDF
    Best,
    Rebecca

  • My iphone 5s 16 gb has an camera problem, turn the camera on tap all green, please help me

    My iphone 5s 16 gb has an camera problem, turn the camera on tap all green, please help me

    Hi teejayfs,
    Thanks for visiting Apple Support Communities.
    If you've noticed unexpected behavior with your iPhone camera, start with these steps to isolate or resolve the issue:
    Camera isn't functioning or has undesired image quality
    If the screen shows a closed lens or black image, force quit the Camera app.
    If you do not see the Camera app on the Home screen, try searching for it in Spotlight. If the camera does not show up in the search, check to make sure that Restrictions are not turned on by tappingSettings > General > Restrictions.
    Ensure the camera lens is clean and free from any obstructions. Use a microfiber polishing cloth to clean the lens.
    Cases can interfere with the camera and the flash. Try gently cleaning the lens with a clean dry cloth or removing the case if you see image or color-quality issues with photos.
    Try turning iPhone off and then back on.
    Tap to focus the camera on the subject. The image may pulse or briefly go in and out of focus as it adjusts.
    Try to remain steady while focusing:
    Still images: Remain steady while taking the picture. If you move too far in any direction, the camera automatically refocuses to the center.
    Note: If you take a picture with iPhone turned sideways, it is automatically saved in landscape orientation.
    Video: Adjust focus before you begin recording. You can also tap to readjust focus while recording. Exiting the Camera application while recording will stop recording and will save the video to the Camera Roll.
    Note: Video-recording features are not available on original iPhone or iPhone 3G.
    If your iPhone has a front and rear camera, try switching between them to verify if the issue persists on both.
    You can find these steps here:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/TS2802
    Regards,
    Jeremy

Maybe you are looking for

  • ORA-00604: error occurred at recursive SQL level

    I only have 2 users and approx 9 schemas. Why is this complaining about maximum cursors?? Error message: ORA-00604: error occurred at recursive SQL level ORA-01000: maximum open cursors exceeded ORA-0064 error occurred at recursive SQL level Cause: A

  • Icon View in Finder using Yosemite

    I currently upgraded to Yosemite from Mavericks, but I've noticed that when using Finder (and it defaults to opening files via Icon view) I don't see my files. When I switch to list or column view, I see my files. Anyone else having this problem?

  • New Ipod Touch will not sync correctly

    I had an Ipod Classic that was recently stolen, apparently by AirTran employees.  Anyway, I got a new iPod Touch to replace it and it will not sync. There are problems even getting it to connect.  The first time I got it connected, I thought it synce

  • 3rd party keyboard no longer works properly with Yosemite

    Prior to the update to Yosemite my third party bluetooth keyboard paired without issue on my wizened 2007 MBP workhorse. I unfortunately spilled some liquid on the keyboard recently. A few keys no longer respond. I will be replacing the keyboard, bei

  • SAPBEX VBA - I need the technical name of my workbook

    Hello everybody, I have to solve the following problem: My task is to open an existing workbook (BE Analyzer) and paste a picture depending on the technical name of the workbook. I have already programed the the download of the picture, but I still n