If you run SELECT * FROM UB_INPUT_OPTIONS WHERE Board_Id = :Board_Id AND Classe = :Classe AND Indice = :Indice
do you get rrecords returned? -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of mauro russo Sent: 28 October 2008 15:45 To: [email protected] Subject: Re: [delphi-en] updating through ADOquery But I have no exceptions. ----- Original Message ----- From: Wilson, Stephen To: [email protected] Sent: Tuesday, October 28, 2008 2:53 PM Subject: RE: [delphi-en] updating through ADOquery If your WHERE clause is not returning false (you say you have checked the params here) then you might try showing any error message in your except block, so: on E: Exception do begin RollbackADOTransaction(); //that is "if ADOconn.InTransaction then ADOconn.RollbackTrans(); showmessage(E.message); Result := false; end; end; -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of mauro russo Sent: 28 October 2008 13:10 To: [email protected] Subject: Re: [delphi-en] updating through ADOquery The code looks like: AdoQuery.Connection := ADOconn; //AdoQuery is TADOWuery type, whereas ADOconn is TADOConnection type. ... AdoQuery.Parameters.ParamByName('Send_On_The_Fly').Value := MyCheckBox.Value; ... //here I can see by the watches that the value of the parameter Send_On_The_Fly is True. //(the type is ftBoolean because in the SQL database this column has 'bit' type. StartADOTransaction(); //that is "if not ADOconn.InTransaction then ADOconn.BeginTrans();" try AdoQuery.ExecSQL(); CommittADOTransaction(); //that is "if ADOconn.InTransaction then ADOconn.CommitTrans();" Result := true; except RollbackADOTransaction(); //that is "if ADOconn.InTransaction then ADOconn.RollbackTrans();" Result := false; end; The AdoQuery.SQL.Text is: UPDATE UB_INPUT_OPTIONS SET Send_On_The_Fly = :Send_On_The_Fly, Send_With_Rtc = :Send_With_Rtc, [Save] = :[Save], Send_Saved = :Send_Saved, Save_With_Rtc = :Save_With_Rtc WHERE Board_Id = :Board_Id AND Classe = :Classe AND Indice = :Indice The ADO connection works because the Insert and the Select work. The ADOquery objects are design time objects, but the association with the ADOconn is at run time. In fact ADOconn is a design time component of the main form, whereas this code runs in a form opened with SowModal. Soon after the CommittADOTransaction, I open the DB with Microsoft SWL Express, but no change happends. I checked for the parmaeters "board_id", "classe" and "indice" and they are correct. Do you need other informations? Do you know about some particular problem other people had in the past? Thanks for support. *************************************************************************** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. *************************************************************************** ---------- Questa email รจ stata verificata dal sistema centralizzato antivirus della UniPlan Software [Non-text portions of this message have been removed] ------------------------------------ ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Groups Links *************************************************************************** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***************************************************************************

