[erlang-patches] ODBC extended error information

Henrik Nord henrik@REDACTED
Mon Oct 8 14:38:54 CEST 2012


Hi!

We would like some tests for this.
Maby a test to check the extended error handling some operation with a 
expected error and some without, and then check for the correct type of 
return value, instead of a hard match for the returned value

Below follows instructions as how to get the odbc SUIT up and running.

Thank you for your contribution!

On 07/25/2012 09:44 AM, Bernie Duggan wrote:
> I did my best to figure out how to add some tests for this change, but
> from talking to a couple of other people I'm not alone in having
> difficulty even getting the ODBC suite running:)  Following the
> instructions on the github wiki page just gives me a
> port_program_executable_not_found error. I'm happy to try harder to
> add some tests if someone can give me a hand with this.

The odbc test suite is not as straight forward as other test suits to 
run as it depends
on so many third part products. In odbc_test.hrl  there is a macro 
defined that
will determine which backed database should be used (you may need to 
change it to suite your circumstances).
Also you need to set up an SQL-data base and an .odbc-ini file for the user
running the test suit. Ex:
-------------------
[Postgres]
Driver=/usr/lib/psqlodbc.so
Description=Postgres driver
ServerName=server1
Database=odbctest
Port=5432
LogonID=odbctest
Password=gurka

[MySQL]
Driver = /opt/local/lib/libmyodbc5.so   Description=MYSQL driver
Server= server2
Database=odbctest
Port=3306
-----------------------

And in the callback-file sqlserver.erl/postgres.erl/mysql.erl/oracle.erl
you may have to alter the connection-string returned by the funtion 
connection_string/0.
If you want some other backed  you will have to make  your own 
callback-module.

-- 
/Henrik Nord Erlang/OTP




More information about the erlang-patches mailing list