[erlang-bugs] ODBC param_query issues.

Ingela Anderton Andin <>
Tue Dec 16 10:10:35 CET 2008


Hi!

Jan Jacobs wrote:
>  Hi,
>  
>  While adding the handling of SQL_TYPE_TIMESTAMP to param_query, I have
>  picked up the following:
>  
>  1) In the source code (odbc.erl) for param_query the following statement
>  appears:
>         [{_,Values}|_]=Params
>     This is wrong according to the documentation:
>          Params = [{odbc_data_type(), [value()]}] |[{odbc_data_type(), 
>  in_or_out(), [value()]}]
>  
>     I changed it to:
>     Values =
>     case Params of    
>       [{_, Vs} | _] -> Vs;
>       [{_, _, Vs} | _] -> Vs
>     end,
>   
Well the in_or_out functionality was submitted as a patch and I guess 
this was missed.
 No test case was submitted with the patch but we added it as it did not 
seem to do any
harm to other functionality. Of course it would be great to have a test 
case, it is on the "todo-list",
but odbc issues does  not tend  to come very high on the "prio-list" I 
am afraid. I will add your change
above.

>  
>  2) Adding additional types requires a lot of changes in the C source in
>  different places. I want to know if I can change the internals of the
>  source code to C++. I need to handle additional types in the
>  param_query.
>     
>   
If you want to submit your new implementation as a patch that will make 
it into
the erlang release you will have to stick with c. Changing it to c++ is  
a far to big
change for us to handle as we have very limited recourses to put into 
the odbc
application. You are free to create an abstract data type if  that 
helps.  Adding another c-file
is no problem.

Regards Ingela  Erlang/OTP - Ericsson







More information about the erlang-bugs mailing list