On 22 Okt., 11:53, Cosimo Guglielmucci <cosimo.guglielmu... / gmail.com> wrote: > Hi all, > I've found very few on the net in regards of Windows and the option > available in the ODBC Driver/ODBC Driver Manager. > So the following problem still remain unsolved: > > irb> require 'odbc' > irb> conn = ODBC::connect('giomai_db_dsn', 'sa', 'password' ) > irb> query = conn.prepare("select * from citt where idcitt = 1) > irb> query.execute > ODBC::Error:37000 (170) [Microsoft][ODBC SQL Server Driver][SQL > Server]Riga 1: sintassi non corretta in prossimit¦Á di ''. > from (irb):xx:in `execute' > from (irb):xx > irb> > As Soon As you are using non ASCII chars for column ( or table ) names You has to use the utf-8 charset. So you need a require 'odbc_utf8' And you has to convert your query strings from cp850 to utf-8 with iconv And you may have to convert you result from utf-8 back to cp850.