[erlang-questions] MySQL and Erlang: ODBC , column type error

Robert Raschke <>
Mon May 11 16:03:53 CEST 2009


On Mon, May 11, 2009 at 2:44 PM, Carl McDade <> wrote:

> [...]
>
> Out of this list there are 8 varchar fields of varying lengths that
> should be supported as strings according to the ODBC to Erlang map in
> the docs.
>
>
These days, those varchar strings are actually very likely to be nvarchar
fields (what does MySQL actually say those columns are?) and therefore not
supported by Erlang odbc. Have you tried using ODBC conversion functions to
recast your SQL results, as I suggested?

Unless you're trying to write some kind of DB agnostic
higher-level-do-anything-kind-of-thingamajig (ORM?), and you want to get a
bit of data in and out of the DB, I suggest just casting your values. It's
easier than any other approach.

Robby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090511/b6d75620/attachment.html>


More information about the erlang-questions mailing list