Fixed binding in prepared statements

This commit is contained in:
Alexey Romanov
2010-12-10 11:24:12 +03:00
parent a49fbd8ec5
commit 55611d5756
2 changed files with 5 additions and 2 deletions

View File

@@ -823,7 +823,7 @@ exec(Port, {prepare, SQL}) ->
wait_result(Port);
exec(Port, {bind, Index, Params}) ->
Bin = term_to_binary({Index, Params}),
port_control(Port, ?SQL_BIND_AND_EXEC_COMMAND, Bin),
port_control(Port, ?PREPARED_BIND, Bin),
wait_result(Port);
exec(Port, {Cmd, Index}) when is_integer(Index) ->
CmdCode = case Cmd of