I would check with the simplest thing first.. make sure you have full grant 
rights to the database..
you would surprised how something this simple will have you chasing your tail.

Would it not be better to use FieldByName.AsString or cast it to the proper 
type opposed to using .Value.. what if the value is null then you could get an 
error.
If all is setup correctly.. I would check with the simplest thing first.. make 
sure you have full grant rights to the database..
you would surprised how something this simple will have you chasing your tail.



--- On Tue, 10/28/08, Wilson, Stephen <[EMAIL PROTECTED]> wrote:

> From: Wilson, Stephen <[EMAIL PROTECTED]>
> Subject: RE: [delphi-en] updating through ADOquery
> To: delphi-en@yahoogroups.com
> Date: Tuesday, October 28, 2008, 8:53 AM
> 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: delphi-en@yahoogroups.com
> [mailto:[EMAIL PROTECTED]
> Behalf Of mauro russo
> Sent: 28 October 2008 13:10
> To: delphi-en@yahoogroups.com
> 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.
> ***************************************************************************
> 
> 
> ------------------------------------
> 
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED]
> Groups Links
> 
> 
> 

      

Reply via email to