<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello All<br>
<br>
The documentation says the following about Params in the param_query
section<br>
<br>
<span class="bold_code">Params = [{odbc_data_type(), [value()]}]
|[{odbc_data_type(), in_or_out(), [value()]}]</span><br>
<br>
<span class="bold_code"></span>So the Params List's element could be a
tuple with three elements. <br>
<br>
in odbc.erl<br>
<br>
param_query(ConnectionReference, SQLQuery, Params, infinity) <br>
when pid(ConnectionReference), list(SQLQuery), list(Params) -><br>
[{_, Values} | _] = Params, <font color="#ff0000">This line
may cause badmatch :(</font><br>
NoRows = length(Values),<br>
NewParams = lists:map(fun fix_params/1, Params),<br>
ODBCCmd = [?PARAM_QUERY, term_to_binary({SQLQuery ++
[?STR_TERMINATOR],<br>
NoRows, NewParams})],<br>
call(ConnectionReference, {param_query, ODBCCmd}, infinity);<br>
<br>
Instead of that line we should use <br>
...<br>
[H|_T] = Params,<br>
Values = <br>
case H of<br>
{_,_,Vals} -> Vals;<br>
{_,Vals} -> Vals; <br>
end,<br>
...<br>
<br>
Or I mistaking something :S<br>
<br>
Regards,<br>
Ákos Kútvölgyi<br>
<br>
<br>
<br>
<br>
</body>
</html>