Содержимое файла при повторном обращении к БД некорректное

Столкнулся с такой проблемой. Сделана запись данных в файл. При первой записи все данные выводятся в файл, но при последующих выводится null. С чем это может быть связано ?

public void FieldFromCursor(Cursor c) {
        if (c.moveToFirst()) {
            _id = c.getLong(c.getColumnIndex("_id"));
            Name = c.getString(c.getColumnIndex("Name"));
            Address = c.getString(c.getColumnIndex("Address"));
            Number = c.getString(c.getColumnIndex("Number"));
        }
    }

public void select(long _id) {
        Cursor c = GlobalVars.db.rawQuery("select * from CustDeliveryTable where _id = ?",
                new String[]{String.valueOf(_id)});
        this.FieldFromCursor(c);
        c.close();
    }

public static String ExportTofile (boolean archive) throws Exception {
        if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
            throw new Exception("Нет доступа к SDCard");
        }
        File sdFile;
        File sdPath = Environment.getExternalStorageDirectory();
        sdPath = new File(sdPath.getAbsolutePath() + "/" + GlobalVars.DirectoryPath);
        if (archive) {
            sdFile = new File(sdPath +".txt");
        } else
            sdFile = new File(GlobalVars.AppPathData(), GlobalVars.DirectoryFileName);
        Cursor cDeliveryTable;

        try {
            BufferedWriter br = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(sdFile),
                    "windows-1251"));
            Log.d(GlobalVars.LOG_TAG, "ExpotToFile: " + sdFile.getAbsolutePath());
            cDeliveryTable = GlobalVars.db.rawQuery("select * from CustDeliveryTable order by _id", null);
            cDeliveryTable.moveToFirst();
            while (!cDeliveryTable.isAfterLast()) {
                CustDeliveryTable st = new CustDeliveryTable(cDeliveryTable.getLong(cDeliveryTable.getColumnIndex("_id")));
                br.write(st.CargoStr() + "\r\n");
                cDeliveryTable.moveToNext();
            }
            br.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            throw e;
        } catch (IOException e) {
            e.printStackTrace();
            throw e;
        }
        return sdFile.getAbsolutePath();
    }

public String CargoStr() {
        String sLine;
        sLine = this.Name
                + ";"
                + this.Address
                + ";"
                + this.Number
                + ";";
        return sLine.substring(0, sLine.length() - 1);
    }

Первая запись в файл

enter image description here

Последующие

Файл


Ответы (0 шт):