[Gambas-user] Insert thext with " ' " in sqlite database

Benoit Minisini gambas at ...1...
Wed Jan 23 15:31:43 CET 2008


On mercredi 23 janvier 2008, Paolo Fagni wrote:
> Hello,
>
> I have to insert data in a sqlite database that has this particular form :
>
> dell'orto
>
> I tried to use DB.Quote(string) but the result is
>
> 'dell'orto'
>
> When I would like to obtain :
>
> 'dell''orto'
>
> Do I have to change it manually with Replace$() ? Thank you for you help.

Actually DB.Quote is not for quoting strings that will be inserted into the 
database, but for quoting database identifiers. Anyway I'm not sure it should 
not return 'dell''orto'...

To quote database values, you must use the Connection.Subst method, or one of 
the following: Edit, Find, Delete, Exec.

Regards,

-- 
Benoit Minisini




More information about the User mailing list