Yes, you are right, .Open method is not appropriate for UPDATE
statement, .ExecSQL is the one that does what I expect to.

Thank you for your help, I realy appreciate it.

Panagiotis

Στις 15-03-2006, ημέρα Τετ, και ώρα 21:29 +0200, ο/η Graeme Geldenhuys
έγραψε:
> > SQLQuery.Close;
> > SQLQuery.SQL.Clear;
> > SQLQuery.SQL.Add( 'update `ids-aa`' );
> > SQLQuery.SQL.Add( 'set `ids-licenses-left`=1' );
> > SQLQuery.SQL.Add( 'where `ids-internet-id`="aa-123456789012345678"' );
> 
> All I can think of, is to make sure you leave spaces between the
> different line, so when that get put together, they still make sence. 
> If I split a Sql statement into seperate lines, I normall start ever
> line with a space.
> 
> eg:
> SQLQuery.SQL.Add( 'where ....
>   ... becomes ...
> SQLQuery.SQL.Add( ' where ....
> 
> 
> > SQLQuery.Open;
> 
> Not sure what components you use, so this may differ from what I use. 
> The statement you are trying to run is a Update statement which
> doesn't return a value, so normally needs to be executed instead of
> Opened...
> 
> eg:  SQLQuery.Execute;
> 
> Select statements would use the SQLQuery.Open;
> 
> As I said, this could be different for certain components.
> 
> Regards,
>   - Graeme -
> 
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
> 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to