- if (((ct_BrowserDB->pTableInf+x)->pColInf+y)->FkCol != 0) // Foreign Key
- {
- Docu = AppendItem(Folder,((ct_BrowserDB->pTableInf+x)->pColInf+y)->colName,TreeIc_KEYF,TreeIc_KEYF,new DBTreeData(Temp1));
- Temp2.Printf(_("This Foreign Key comes from the following Table : %s"),((ct_BrowserDB->pTableInf+x)->pColInf+y)->FkTableName);
- Funkt = AppendItem(Docu,Temp2,TreeIc_DocClosed,TreeIc_DocOpen,new DBTreeData("KEYF"));
- }
- else
- Docu = AppendItem(Folder,((ct_BrowserDB->pTableInf+x)->pColInf+y)->colName,TreeIc_COL,TreeIc_COL,new DBTreeData(Temp1));
- SQL_TYPE.Printf(_("SQL_C_???? (%d)"),((ct_BrowserDB->pTableInf+x)->pColInf+y)->sqlDataType);
- DB_TYPE.Printf(_("DB_DATA_TYPE_???? (%d)"),((ct_BrowserDB->pTableInf+x)->pColInf+y)->dbDataType);
- for (i=1;i<=(pDoc->db_Br+i_Which)->i_SqlTyp[0];i++)
- {
- if (((ct_BrowserDB->pTableInf+x)->pColInf+y)->sqlDataType == (pDoc->db_Br+i_Which)->i_SqlTyp[i])
- {
- SQL_TYPE.Printf("%s(%d) ; ",(pDoc->db_Br+i_Which)->s_SqlTyp[i].c_str(),(pDoc->db_Br+i_Which)->i_SqlTyp[i]);
- }
- } // for (i=1;i<=i_SqlTyp[0];i++)
- for (i=1;i<=(pDoc->db_Br+i_Which)->i_dbTyp[0];i++)
- {
- if (((ct_BrowserDB->pTableInf+x)->pColInf+y)->dbDataType == (pDoc->db_Br+i_Which)->i_dbTyp[i])
- {
- DB_TYPE.Printf("%s(%d)",(pDoc->db_Br+i_Which)->s_dbTyp[i].c_str(),(pDoc->db_Br+i_Which)->i_dbTyp[i]);
- }
- } // for (i=1;i<=i_dbTyp[0];i++)
- SQL_TYPE += DB_TYPE;
- Funkt = AppendItem(Docu,SQL_TYPE,TreeIc_DocClosed,TreeIc_DocOpen,new DBTreeData(SQL_TYPE));
- SQL_TYPE.Printf("%10s %d,%d",((ct_BrowserDB->pTableInf+x)->pColInf+y)->typeName,
- ((ct_BrowserDB->pTableInf+x)->pColInf+y)->columnSize,
- ((ct_BrowserDB->pTableInf+x)->pColInf+y)->decimalDigits);
- Funkt = AppendItem(Docu,SQL_TYPE,TreeIc_DocClosed,TreeIc_DocOpen,new DBTreeData(SQL_TYPE));
- } // for (y=0;y<(ct_BrowserDB->pTableInf+x)->numCols;y++)
- } // if ((ct_BrowserDB->pTableInf+x)->pColInf)
- else
- Folder = AppendItem(Root,Temp0,TreeIc_FolderClosed,TreeIc_FolderOpen, new DBTreeData(Temp1));
- } // if ((ct_BrowserDB->pTableInf+x)->tableType == "TABLE")
- } // for (x=0;x<ct_BrowserDB->numTables;x++)
- } // if (ct_BrowserDB)
- else
- wxLogMessage(_("\n-E-> DBTree::OnPopulate() : Invalid Catalog Pointer : Failed"));
- } // if((pDoc->db_Br+i_Which)->Initialize(FALSE))
+ {
+ if (((ct_BrowserDB->pTableInf+x)->pColInf+y)->FkCol != 0) // Foreign Key
+ {
+ Temp2.Printf("(%d) - %s",((ct_BrowserDB->pTableInf+x)->pColInf+y)->FkCol,((ct_BrowserDB->pTableInf+x)->pColInf+y)->colName);
+ Docu = AppendItem(Folder,Temp2,TreeIc_KEYF,TreeIc_KEYF,new DBTreeData(Temp1));
+ Temp2.Printf(_("This Foreign Key comes from the following Table : %s"),((ct_BrowserDB->pTableInf+x)->pColInf+y)->FkTableName);
+ Funkt = AppendItem(Docu,Temp2,TreeIc_DocClosed,TreeIc_DocOpen,new DBTreeData("KEYF"));
+ }
+ else
+ Docu = AppendItem(Folder,((ct_BrowserDB->pTableInf+x)->pColInf+y)->colName,TreeIc_COL,TreeIc_COL,new DBTreeData(Temp1));
+ }
+ SQL_TYPE.Printf("SQL_C_???? (%d)",((ct_BrowserDB->pTableInf+x)->pColInf+y)->sqlDataType);
+ DB_TYPE.Printf("DB_DATA_TYPE_???? (%d)",((ct_BrowserDB->pTableInf+x)->pColInf+y)->dbDataType);
+ for (i=1;i<=(pDoc->db_Br+i_Which)->i_SqlTyp[0];i++)
+ {
+ if (((ct_BrowserDB->pTableInf+x)->pColInf+y)->sqlDataType == (pDoc->db_Br+i_Which)->i_SqlTyp[i])
+ {
+ SQL_TYPE.Printf("%s(%d) ; ",(pDoc->db_Br+i_Which)->s_SqlTyp[i].c_str(),(pDoc->db_Br+i_Which)->i_SqlTyp[i]);
+ }
+ } // for (i=1;i<=i_SqlTyp[0];i++)
+ for (i=1;i<=(pDoc->db_Br+i_Which)->i_dbTyp[0];i++)
+ {
+ if (((ct_BrowserDB->pTableInf+x)->pColInf+y)->dbDataType == (pDoc->db_Br+i_Which)->i_dbTyp[i])
+ {
+ DB_TYPE.Printf("%s(%d)",(pDoc->db_Br+i_Which)->s_dbTyp[i].c_str(),(pDoc->db_Br+i_Which)->i_dbTyp[i]);
+ }
+ } // for (i=1;i<=i_dbTyp[0];i++)
+ SQL_TYPE += DB_TYPE;
+ Funkt = AppendItem(Docu,SQL_TYPE,TreeIc_DocClosed,TreeIc_DocOpen,new DBTreeData(SQL_TYPE));
+ SQL_TYPE.Printf("%10s %d,%d",((ct_BrowserDB->pTableInf+x)->pColInf+y)->typeName,
+ ((ct_BrowserDB->pTableInf+x)->pColInf+y)->columnSize,((ct_BrowserDB->pTableInf+x)->pColInf+y)->decimalDigits);
+ Funkt = AppendItem(Docu,SQL_TYPE,TreeIc_DocClosed,TreeIc_DocOpen,new DBTreeData(SQL_TYPE));
+ } // for (y=0;y<(ct_BrowserDB->pTableInf+x)->numCols;y++)
+ } // if ((ct_BrowserDB->pTableInf+x)->pColInf)
+ else
+ Folder = AppendItem(Root,Temp0,TreeIc_FolderClosed,TreeIc_FolderOpen, new DBTreeData(Temp1));
+ z++;
+ if (z % 10 == 0)
+ {
+ Temp0.Printf(_("-I-> DBTree::OnPopulate(%s) - Table %6d has been read."),(ct_BrowserDB->pTableInf+x)->tableName,z);
+ pDoc->p_MainFrame->SetStatusText(Temp0, 0);
+ }
+ } // if ((ct_BrowserDB->pTableInf+x)->tableType == "TABLE" or VIEW)
+ // else
+ // wxLogMessage(_("\n-I-> if ! TABLE or VIEW >%s<"),(ct_BrowserDB->pTableInf+x)->tableType);
+ } // for (x=0;x<ct_BrowserDB->numTables;x++)
+ } // if (ct_BrowserDB)