public add ( |
||
c | ||
key | String | |
return |
private bool fillColumns(string sqlstmt) { var db = new cDataBase(csDatabaseEngine.SQL_SERVER); if (db.initDb(m_strConnect)) { DbDataReader rs; if (db.openRs(sqlstmt, out rs, "fillColumns", "cConnect", "Update columns's definition", CSKernelClient.eErrorLevel.eErrorInformation)) { for (int i = 0; i < rs.FieldCount; i++) { var column = new cColumnInfo(); column.setName(rs.GetName(i)); column.setPosition(i); column.setColumnType((csDataType)System.Type.GetTypeCode((rs.GetFieldType(i)))); m_columnsInfo.add(column, ""); } } else { return(false); } } return(true); }