public bool WriteNextRow() { List <string> row = new List <string>(); if (tableMode) { if (sForWriting.GetRow()) { for (int i = 0; i < sForWriting.FieldCount; i++) { row.Add(sForWriting.GetString(i)); } } } else { if (selectedIndices != null && saveSelected.Checked) { rowIndex = indicesIndex >= selectedIndices.Count ? -1 : selectedIndices[indicesIndex++]; } else { if (rowIndex >= query.rows.Count) { rowIndex = -1; } } if (rowIndex >= 0) { for (int i = 0; i < query.columns.Count; i++) { if (selectedColumnsIndexes.Contains(i)) { row.Add(query.rows[rowIndex][i]); } } rowIndex++; } } if (row.Count == 0) { return(false); } renderer.WriteRow(row); return(true); }
string GetColumnValue(QSqlBase s, int i) { string result = null; try { if (!s.IsNull(i)) { result = s.GetString(i); } } catch (Exception e) { if (!columnGetDataErrors.Contains(i)) { A.AddToLog("error getting value for column " + i + " - " + e.Message, true, MsgStatus.Warning); A.AddToLog("further errors for column " + i + " will be suppressed", false, MsgStatus.Warning); columnGetDataErrors.Add(i); } } return(result); }