anchor.diff:          {ok, DbHandle} ->
               case allocate_statement(TcpMod, Sock, DbHandle) of
                   {ok, StmtHandle} ->
  -                    {ok, State#state{db_handle = DbHandle, stmt_handle = StmtHandle, accept_version = AcceptVersion}};
  +                    {ok, State#state{db_handle = DbHandle, stmt_handle = StmtHandle}};
                   {error, Msg2} ->
  -                    {{error, Msg2}, State#state{db_handle = DbHandle, accept_version = AcceptVersion}}
  +                    {{error, Msg2}, State#state{db_handle = DbHandle}}
               end;
           {error, Msg3} ->
               {{error, Msg3}, State}
       end.
   
  -create_database(TcpMod, Sock, User, Password, Database, PageSize, AcceptVersion, State) ->
  -    TcpMod:send(Sock,
  -        efirebirdsql_op:op_create(User, Password, Database, PageSize, AcceptVersion)),
  +create_database(TcpMod, Sock, User, Password, Database, PageSize, State) ->
  +    TcpMod:send(Sock,
  +        efirebirdsql_op:op_create(User, Password, Database, PageSize, State#state.accept_version)),
       R = case efirebirdsql_op:get_response(TcpMod, Sock) of
           {op_response, {ok, Handle, _}} -> {ok, Handle};
           {op_response, {error, Msg}} ->{error, Msg}
  
positive.code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %% Utility functions in module
  
  connect_database(TcpMod, Sock, Username, Password, Database, PageSize, AcceptVersion, IsCreateDB, State) ->
      case IsCreateDB of
          true ->
              create_database(TcpMod, Sock, Username, Password, Database, PageSize, AcceptVersion, State);
          false ->
              attach_database(TcpMod, Sock, Username, Password, Database, AcceptVersion, State)
      end.
  
  attach_database(TcpMod, Sock, User, Password, Database, AcceptVersion, State) ->
      TcpMod:send(Sock,
          efirebirdsql_op:op_attach(User, Password, Database, AcceptVersion)),
      R = case efirebirdsql_op:get_response(TcpMod, Sock) of
          {op_response, {ok, Handle, _}} -> {ok, Handle};
          {op_response, {error, Msg}} ->{error, Msg}
  
negative.code:         {ok, DbHandle} ->
              case allocate_statement(TcpMod, Sock, DbHandle) of
                  {ok, StmtHandle} ->
                      {ok, State#state{db_handle = DbHandle, stmt_handle = StmtHandle}};
                  {error, Msg2} ->
                      {{error, Msg2}, State#state{db_handle = DbHandle}}
              end;
          {error, Msg3} ->
              {{error, Msg3}, State}
  