Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.31 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. With Delphi Xe2 and MySQL 5.1, how return UTF8 string from query?
  2. SQLConnection1.Connected:= True;
  3.   SQLConnection1.ExecuteDirect('set names utf8;');
  4.        
  5. with DMMySQL.SQLDataSet1 do
  6.   begin
  7.     if Locate('COD_GOOGLE', LanguageValue, []) then
  8.       Result:= UTF8Decode(FieldByName('DESCRIPTION').AsString); //
  9.   end;