anchor.diff:      Mod:send(Sock, efirebirdsql_op:op_free_statement(StmtHandle)),
       {op_response, {ok, _, _}} = efirebirdsql_op:get_response(Mod, Sock).
   
  +%% Execute, Fetch and Description
   execute(Mod, Sock, TransHandle, StmtHandle, Params) ->
       Mod:send(Sock,
           efirebirdsql_op:op_execute(TransHandle, StmtHandle, Params)),
  
positive.code:         _ -> {error, "Can't begin transaction"}
      end.
  
  allocate_statement(Mod, Sock, DbHandle) ->
      Mod:send(Sock,
          efirebirdsql_op:op_allocate_statement(DbHandle)),
      case efirebirdsql_op:get_response(Mod, Sock) of
          {op_response,  {ok, Handle, _}} -> {ok, Handle};
          _ -> {error, "Allocate statement failed"}
      end.
  
  prepare_statement(Mod, Sock, TransHandle, StmtHandle, Sql) ->
      Mod:send(Sock,
          efirebirdsql_op:op_prepare_statement(TransHandle, StmtHandle, Sql)),
  
negative.code:                 {ok, DbHandle} ->
                      case allocate_statement(Mod, Sock, DbHandle) of
                          {ok, StmtHandle} ->
                              {ok, State#state{db_handle = DbHandle, stmt_handle = StmtHandle}};
                          {error, _Reason} ->
                              {{error, "Can't allocate statement"}, State#state{db_handle = DbHandle}}
                      end;
                  {error, _Reason} ->
                      {R, State}
              end;
          op_reject -> {{error, "Connection Rejected"}, State}
      end.
  
  detach(Mod, Sock, DbHandle) ->
      Mod:send(Sock, efirebirdsql_op:op_detach(DbHandle)),
      case efirebirdsql_op:get_response(Mod, Sock) of
          {op_response,  {ok, _, _}} -> ok;
          _ -> {error, "Detach failed"}
      end.
  
  
  %% Transaction
  begin_transaction(Mod, Sock, DbHandle, Tpb) ->
      Mod:send(Sock,
          efirebirdsql_op:op_transaction(DbHandle, Tpb)),
  