anchor.diff:          [invalid_connection | _Rest] ->
               From ! {reply, error_invalid_conn()};
           _ ->
  -            ListNames = [binary_to_list(X) || X <- TableErrors],
  -            BinTblError = list_to_binary(string:join(ListNames, ",")),
  +            TableErrorsBin = lists:foldl(
  +                fun({Table, Error}, Acc) ->
  +                        ErrorBin = imem_datatype:term_to_io(Error),
  +                        <<Acc/binary, Table/binary, <<" - ">>/binary, ErrorBin/binary, <<", ">>/binary>>;
  +                   (Table, Acc) ->  <<Acc/binary, Table/binary, <<", ">>/binary>>
  +                end, <<>>, TableErrors),
  +            FTableErrorsBin = re:replace(TableErrorsBin, <<", $">>, <<>>, [{return, binary}]),
               [CmdSplit|_] = binary:split(BinCmd, <<"_">>),
  -            Err = iolist_to_binary([<<"Unable to ">>, CmdSplit, <<" the following tables: ">>,  BinTblError]),
  +            Err = iolist_to_binary([<<"Unable to ">>, CmdSplit, <<" the following tables: ">>,  FTableErrorsBin]),
               ?Error("Error: ~p",  [Err]),
               From ! {reply, jsx:encode([{BinCmd, [{<<"error">>, Err}]}])}
       end,
  
positive.code:     ?Debug("Rows last ~p", [CsvRows]),
      From ! {reply_csv, <<>>, CsvRows, last},
      Connection:run_cmd(close, [StmtRef]).
      
  -spec disconnect(#priv{}) -> #priv{}.
  disconnect(#priv{connections = []} = Priv) -> Priv;
  disconnect(#priv{connections = [Connection | Rest]} = Priv) ->
  
negative.code:     Priv.
  
  sql_name(Name) ->
      %% accept {Schema,Name} and convert to Schema.Name
      case re:split(Name,"[,]") of
          [<<${,S/binary>>,N] ->
              NN0=re:replace(N,"}$","",[{return,binary}]),
              NN1=re:replace(NN0,"^'","",[{return,binary}]),
              NN2=re:replace(NN1,"'$","",[{return,binary}]),
              % convert "{Schema,Name}"" to "Schema.Name"
              <<S/binary,$.,NN2/binary>>;
          _ ->
              Name
      end.
  