anchor.diff:          54, 4, byte4(1, little),        %% isc_dpb_overwrite = 54
           4, 4, byte4(PageSize, little)   %% isc_dpb_page_size = 4
       ]),
  -    Buf = lists:flatten([
  +    list_to_binary(lists:flatten([
           byte4(op_val(op_create)),
           byte4(0),
  -        byte4(length(Database)), Database,
  -        byte4(length(Dpb)), Dpb]),
  -    list_to_binary([Buf, pad4(Buf)]).
  +        list_to_xdr_string(Database),
  +        list_to_xdr_bytes(Dpb)])).
   
   
   %%% begin transaction
  
positive.code:         byte4(op_val(op_attach)),
          byte4(3),  %% CONNECT_VERSION
          byte4(1),  %% arch_generic,
          byte4(length(Database)),
          Database,
          byte4(1),  %% Count of acceptable protocols (VERSION 10 only)
          uid(Host, Username)],
      list_to_binary([Buf, pad4(Buf), Protocols]).
  
  %%% create op_attach binary
  op_attach(Username, Password, Database) ->
  
negative.code:         28, length(Username), Username,  %% isc_dpb_user_name 28
          29, length(Password), Password   %% isc_dpb_password = 29
      ]),
      list_to_binary(lists:flatten([
          byte4(op_val(op_attach)),
          byte4(0),
          list_to_xdr_string(Database),
          list_to_xdr_bytes(Dpb)])).
  
  
  %%% create op_connect binary
  