/ Allocate OCCUR column description block. */ /
| 346 | /* Allocate OCCUR column description block. */ |
| 347 | /***********************************************************************/ |
| 348 | bool TDBOCCUR::MakeColumnList(PGLOBAL g) |
| 349 | { |
| 350 | char *pn; |
| 351 | int i; |
| 352 | PCOL colp; |
| 353 | |
| 354 | for (colp = Columns; colp; colp = colp->GetNext()) |
| 355 | if (colp->GetAmType() == TYPE_AM_PRX) |
| 356 | if (((PPRXCOL)colp)->Init(g, NULL)) |
| 357 | return true; |
| 358 | |
| 359 | Col = (PCOL*)PlugSubAlloc(g, NULL, Mult * sizeof(PCOL)); |
| 360 | |
| 361 | for (i = 0, pn = Colist; i < Mult; i++, pn += (strlen(pn) + 1)) { |
| 362 | if (!(Col[i] = Tdbp->ColDB(g, pn, 0))) { |
| 363 | // Column not found in table |
| 364 | snprintf(g->Message, sizeof(g->Message), MSG(COL_ISNOT_TABLE), pn, Tabname); |
| 365 | return true; |
| 366 | } // endif Col |
| 367 | |
| 368 | if (Col[i]->InitValue(g)) { |
| 369 | strcpy(g->Message, "OCCUR InitValue failed"); |
| 370 | return true; |
| 371 | } // endif InitValue |
| 372 | |
| 373 | } // endfor i |
| 374 | |
| 375 | return false; |
| 376 | } // end of MakeColumnList |
| 377 | |
| 378 | /***********************************************************************/ |
| 379 | /* Allocate OCCUR column description block for a view. */ |