[Gambas-user] Characters with ~ or ' not saved correctly in MySQL

Benoit Minisini gambas at ...1...
Mon Aug 7 14:32:49 CEST 2006


On Monday 07 August 2006 14:22, Fabricio Silva wrote:
> This is a strange behavior the happens only if I save data in MySQL using
> gambas. For example using gambas the word "Goiás" is stored "Goiás" in
> database. Using phpmyadmin to insert data the word "Goiás" is saved
> correctly. I'm using this code:
>      .rs = .db.Exec("insert into employes values( ' " & txtname.text & "
> ',' " & txtaddress.Text & " ')")
>
> Am I forgeting something that I should tell gambas to do in order to save
> data? Or it uses the table definitions?
> I'm using SuSE 10.0 - MySQL4.1.13 - Gambas 1.9.35 - Collation of the table
> and fields: latin1_swedish_ci
>
>
> Fabricio

Gambas uses UTF-8 charset. You must convert Gambas charset (Desktop.Charset) 
to database charset (Connection.Charset) with the Conv() function before 
inserting the data into the database.

Regards,

-- 
Benoit Minisini





More information about the User mailing list