ODBC Problem with Example

Laura M. Castro <>
Wed Nov 16 11:10:11 CET 2005


  Hello Charles,

    I have run your example and I can not reproduce the error:

> 1> {ok, Ref} = odbc:connect("DSN=PostgreSQL",[]).
> 
> =PROGRESS REPORT==== 15-Nov-2005::09:58:34 ===
>          application: odbc
>           started_at: 
> 
> =INFO REPORT==== 15-Nov-2005::09:58:34 ===
> The odbc application was not started. Has now been started as a temporary
> application. {ok,<0.45.0>}
> 2> odbc:sql_query(Ref,"create table test (varchar char 
> 2> varying(40),char_array char(40),int4 int4)").
> {updated,0}
> 3> odbc:describe_table(Ref,"test").
> {ok,[{"varchar",'ODBC_UNSUPPORTED_TYPE'},
>      {"char_array",'ODBC_UNSUPPORTED_TYPE'},
>      {"int4",sql_integer}]}

    This is the output I get,

Erlang (BEAM) emulator version 5.4.9 [source] [hipe]

Eshell V5.4.9  (abort with ^G)
1> application:start(odbc).
ok
2> {ok, C} = odbc:connect("DSN=ourdatabase",[]).
{ok,<0.42.0>}
3> odbc:sql_query(C,"create table test (varchar char
varying(40),char_array char(40),int4 int4)").
{updated,0}
4> odbc:describe_table(C,"test").
{ok,[{"varchar",{sql_varchar,40}},
     {"char_array",{sql_char,40}},
     {"int4",sql_integer}]}

    We use Erlang R10B-7, PostgreSQL 7.4, and the odbc-postgresql, and
unixodbc driver packages in Debian GNU/Linux (sid). We have also
performed this test over Erlang R9C-2 and it works, too.

    :-?

    Best regards,

	Laura Castro



More information about the erlang-questions mailing list