JamDB Sybase is a small and fast Erlang driver for SAP Sybase Adaptive Server Enterprise (ASE).
- No third-party dependencies.
- No parameterized module.
- No process dictionary.
- No ports.
- No NIF's.
- All code written exclusively in Erlang.
%% Set connection options
1> Opts = [
{host, "jamdb-sybase-dev.erlangbureau.dp.ua"},
{port, 5000},
{user, "jamdbtest"},
{password, "jamdbtest"},
{database, "jamdbtest"}
].
%% Connect
2> {ok, Pid} = jamdb_sybase:start_link(Opts).
{ok,<0.36.0>}
%% Simple select
3> {ok, Result} = jamdb_sybase:sql_query(Pid, "select 1 as one, 2 as two, 3 as three").
{ok,[{result_set,[
<<"one">>,<<"two">>,<<"three">>],
[],
[[1,2,3]]}]}
The default encoding in Erlang is utf8. So jamdb_sybase sending all strings to the server in utf8. They should by automatically converted to the corresponding encoding by the server. If the database server cannot do so, it generates an error message indicating that character conversion cannot be properly completed.