[Gambas-user] Bug in Gambas mySQL & DELETE &
Pablo Vera
pvera at ...729...
Mon Apr 4 15:07:35 CEST 2005
I think that there are a couple of quotes missing here:
Exec("Delete from table1 where name='&1'", "My Company & Brothers")
otherwise, the SQL statement will match
name=My Company & Brothers
which might produce an error, instead of
name='My Company & Brothers'
Saludos,
Pablo Vera
______________________________________________________________
Benoit Minisini wrote:
>
> The Exec(), Find(), and Edit() methods do substitutions, like the Subst()
> function - RTFM :-)
>
> To use a '&', you must double it:
>
> Exec("Delete from table1 where name= 'My Company && Brothers' ")
>
> Anyway, you should use the substitution feature:
>
> Exec("Delete from table1 where name=&1", "My Company & Brothers")
>
> This way, you code will be portable if you change your database system.
More information about the User
mailing list