Mysql embedded

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
dip56245
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 16.01.2007, 10:24
Contact:

Mysql embedded

Post by dip56245 »

Please advice
How to set the codepade cp1251 while connect libmysqld50.dll?
I've tried --with-charset, --default-character-set and others: after .Connect() i receive the error message or the application crashes.
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Try to set it when the connection is started. I do this in the OnConnect event

query1.sql.text = 'SET NAMES cp1251'
query1.execsql;

But include a try-except for non MySQL 5 servers (ex. 3.23.50)
dip56245
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 16.01.2007, 10:24
Contact:

Post by dip56245 »

zippo wrote:Try to set it when the connection is started. I do this in the OnConnect event

query1.sql.text = 'SET NAMES cp1251'
query1.execsql;

But include a try-except for non MySQL 5 servers (ex. 3.23.50)
now work on 4.1 embedded.
But i use utf8, (cp1251 not work - type "charset not found", in charset's dir cp1251.xml exist). Now problem when i do select * from test where name like 'russian text%' - some time result wrong, and order by work not correct. 8(
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

Try win1251 instead of cp1251
Post Reply