AddColumn
新しい列を追加します。
構文
int addColumn(DataTable* dataTable, const char* columnName,
int* indexReturn)
int addColumn(DataTable* dataTable, const UChar* columnName,
int* indexReturn)
パラメータ
- Datatable - この関数で操作する DataTable。
- 列名を DataTable に追加します。
- 対応するインデックスを返します。
結果
0 (正常終了) またはエラー コードを返します。
例外
- 列名が空白です。
- 同名の列がすでにあります。
例
int nIndex;
int nRet;
nRet= addColumn( dataTable, "AddressLine1", &nIndex);
nRet= addColumn( dataTable, "City",&nIndex);
nRet= addColumn( dataTable, "State", &nIndex);
if(nRet != SUCCESSFUL_RETURN)
{
printf(getErrorMessage(nRet));
return ;
}
int nRet;
int nIndex;
UChar* error;
UChar city[64];
char* cityString= "City"
u_charsToUChars(cityString, city, strlen(cityString));
city[ strlen(cityString)]=0;
nRet= addColumn( dataTable, city,&nIndex);
if(nRet != SUCCESSFUL_RETURN)
{
error = getErrorMessage(nRet);
//more code
}