V 8
2
LANG:0 12 IS-Datenbank
LANG:1 11 IS-Database
PANEL,34 47 612 400 N "_3DFace" 0
"main()
{
  int        i,pos=0;
  dyn_int    DbAlivePeriod,
             DbCommitPeriod,DbCommitCount;
  dyn_string DbName,
             DbType,
             DbPath,
             DbUser,DbPassword,
             _IS_Table=dpNames(\"*\",\"_IS_Table\"),
             _IS_Db=dpNames(\"*\",\"_IS_Database\"),
             _IS_Ag=dpNames(\"*\",\"_IS_ArchiveGroup\"),
             filename,type,path,dbname;
  
  string st;

  if (!_WIN32)
  {
    st=getCurrentTime();
    DebugN(\"IS::: \"+st+\" Error: Information Server runs only under Windows NT !\");
    RootPanelOn(\"vision/MessageWarning\",
      getCatStr(\"para\",\"warning\"),
      makeDynString(\"IS::: \"+st+\"\\nError: Information Server runs only under Windows NT !\"));
    return;
  }

  addGlobal(\"ISDbGlobal\",STRING_VAR);
  addGlobal(\"ISActiveRegisterGlobal\",INT_VAR);

  for (i=1;i<=dynlen(_IS_Db);i++)
  {
    _IS_Db[i]=dpSubStr(_IS_Db[i],DPSUB_DP);
    dpGet(_IS_Db[i]+\".DbName:_original.._value\",filename[i],
          _IS_Db[i]+\".DbType:_original.._value\",type[i],
          _IS_Db[i]+\".DbPath:_original.._value\",path[i],
          _IS_Db[i]+\".DbUser:_original.._value\",DbUser[i],
          _IS_Db[i]+\".DbPassword:_original.._value\",DbPassword[i],
          _IS_Db[i]+\".DbAlivePeriod:_original.._value\",DbAlivePeriod[i],
          _IS_Db[i]+\".DbCommitPeriod:_original.._value\",DbCommitPeriod[i],
          _IS_Db[i]+\".DbCommitCount:_original.._value\",DbCommitCount[i]);
    switch (type[i])
    {
// !!! DB-specific
      case \"MS Access\"     : dbname[i]=filename[i];
                             strreplace(dbname[i],\".mdb\",\"\");
                             break;
      case \"MS Excel\"      : dbname[i]=filename[i];
                             strreplace(dbname[i],\".xls\",\"\");
                             break;
      case \"MS SQL-Server\" : dbname[i]=filename[i];
                             //strreplace(dbname[i],\".mdb\",\"\");
                             break;
      case \"Oracle\"        : dbname[i]=filename[i];
                             //strreplace(dbname[i],\".mdb\",\"\");
                             break;
      default              : break;
    }
  }
  pos=dynContains(dbname,ISDbGlobal);
  if ( (pos<1) && dynlen(dbname)>0)
    pos=1;
  if (pos>0)
  {
    setMultiValue(\"DbName\",\"text\",dbname[pos],
                  \"Databases\",\"text\",dbname[pos],
                  \"Databases\",\"items\",dbname,
                  \"DbPath\",\"text\",path[pos],
                  \"DbType\",\"text\",type[pos],
                  \"DbUser\",\"text\",DbUser[pos],
                  \"DbPassword\",\"text\",DbPassword[pos],
                  \"DbAlivePeriod\",\"text\",DbAlivePeriod[pos]/60,
                  \"DbCommitPeriod\",\"text\",DbCommitPeriod[pos],
                  \"DbCommitCount\",\"text\",DbCommitCount[pos],
                  \"DbAlivePeriod_old\",\"text\",DbAlivePeriod[pos]/60,
                  \"DbCommitPeriod_old\",\"text\",DbCommitPeriod[pos],
                  \"DbCommitCount_old\",\"text\",DbCommitCount[pos]);
    ISDbGlobal=dbname[pos];
  }
}
" 0
 E E "main() 
{ 
  int        answer; 
  string     FileName; 
  dyn_string txt; 
 
  if (strpos(getLocale(getActiveLang()),\"de_AT\")==0)
    txt = makeDynString(\"PUSH_BUTTON,IS_Alive löschen,1,1\",
                        \"PUSH_BUTTON,IS_Tables löschen,2,1\",
                        \"PUSH_BUTTON,IS_Description löschen,3,1\",
                        \"PUSH_BUTTON,IS_Description aktualisieren,4,1\",
                        \"PUSH_BUTTON,syslogs löschen (SQL-Server),5,1\");
  else
    txt = makeDynString(\"PUSH_BUTTON,Delete IS_Alive,1,1\",
                        \"PUSH_BUTTON,Delete IS_Tables,2,1\",
                        \"PUSH_BUTTON,Delete IS_Description,3,1\",
                        \"PUSH_BUTTON,Actualize IS_Description,4,1\",
                        \"PUSH_BUTTON,Delete syslogs (SQL-Server),4,1\");

  popupMenu(txt,answer); 
 
  switch (answer)
  {
    case 1 : delAlive(); break;
    case 2 : delTables(); break;
    case 3 : delDescription(); break;
    case 4 : actDescription(); break;
    case 5 : delSyslogs(); break;
    default: return;
  }
}

delAlive()
{
  int          err,i,pos,DbAlivePeriod;
  bool         exists,insert=false;
  string       TableName,AgTableName,AgDbName,Db,sql,
               DbName,DbPath,DbType,DbUser,DbPassword,dp;
  dyn_float    df;
  dyn_string   tables,ds,
               _IS_Db=dpNames(\"*\",\"_IS_Database\");
  dbConnection conn;

  ChildPanelOnCentralModalReturn(\"vision/is/IS_MessageInfo.pnl\",
    getCatStr(\"IS\",\"deletingalive\"),
    makeDynString(getCatStr(\"IS\",\"deletealive\"),
                  getCatStr(\"IS\",\"yes\"),
                  getCatStr(\"IS\",\"no\")),
    df,ds);
  if (df[1]!=1)
  {
    return;
  }
  
  ISActiveRegisterGlobal=0;
  getValue(\"DbName\",\"text\",Db);

  TableName=\"IS_Alive\";
  if (Db==\"\")
  {
    // error: table name == \"\"
    ISShowWarning(\"emptydbname\",\"\");
    return;
  }

  dpGet(Db+\".DbName:_original.._value\",DbName,
        Db+\".DbPath:_original.._value\",DbPath,
        Db+\".DbType:_original.._value\",DbType,
        Db+\".DbUser:_original.._value\",DbUser,
        Db+\".DbPassword:_original.._value\",DbPassword,
        Db+\".DbAlivePeriod:_original.._value\",DbAlivePeriod);

  if ( (DbType==\"MS Access\" || DbType==\"MS Excel\") && access(DbPath+DbName,F_OK)!=0)
  {
    // error: db-file does not exist
    ISShowWarning(\"dbfilenotexist\",DbPath+DbName);
    return;
  }
    
  err=IS_OpenConnection(DbName, 
                        DbPath, 
                        DbType, 
                        DbUser, 
                        DbPassword, 
                        conn);
  if (err)
  {
    // error: deleting table
    adoShowError(conn);
    return;
  }

  switch (DbType)
  {
// !!! DB-specific
    case \"MS Access\"     : sql=\"DROP TABLE \"+TableName;
                           break;
    case \"MS Excel\"      : return;
                           sql=\"DROP TABLE \"+TableName;
                           break;
    case \"MS SQL-Server\" : sql=\"DROP TABLE \"+TableName;
                           break;
    case \"Oracle\"        : sql=\"DROP TABLE \"+TableName;
                           break;
    default              : return;
  }

  err=IS_Command2(conn, sql, err); 
  if (err)
  {
    // error: deleting table
    adoShowError(conn);
    dbCloseConnection(conn);
    return;
  }
  dbCloseConnection(conn);
  ISShowWarning(\"tabledeletedisdb\",TableName);
  ISShowWarning(\"restartctrl\",\"\");
  RootPanelOn(\"vision/is/IS_Para.pnl\",myModuleName(),
              makeDynString());
}

delTables()
{
  int          err,i,pos,DbAlivePeriod;
  bool         exists,insert=false;
  string       TableName,AgTableName,AgDbName,Db,sql,
               DbName,DbPath,DbType,DbUser,DbPassword,dp;
  dyn_float    df;
  dyn_string   tables,ds,
               _IS_Db=dpNames(\"*\",\"_IS_Database\"),
               _IS_Ag=dpNames(\"*\",\"_IS_ArchiveGroup\");
  dbConnection conn;

  ChildPanelOnCentralModalReturn(\"vision/is/IS_MessageInfo.pnl\",
    getCatStr(\"IS\",\"deletingtables\"),
    makeDynString(getCatStr(\"IS\",\"deletetables\"),
                  getCatStr(\"IS\",\"yes\"),
                  getCatStr(\"IS\",\"no\")),
    df,ds);
  if (df[1]!=1)
  {
    return;
  }
  
  ISActiveRegisterGlobal=1;
  getValue(\"DbName\",\"text\",Db);

  TableName=\"IS_Tables\";
  if (Db==\"\")
  {
    // error: table name == \"\"
    ISShowWarning(\"emptydbname\",\"\");
    return;
  }

  
  dpGet(Db+\".DbName:_original.._value\",DbName,
        Db+\".DbPath:_original.._value\",DbPath,
        Db+\".DbType:_original.._value\",DbType,
        Db+\".DbUser:_original.._value\",DbUser,
        Db+\".DbPassword:_original.._value\",DbPassword,
        Db+\".DbAlivePeriod:_original.._value\",DbAlivePeriod);

  if ( (DbType==\"MS Access\" || DbType==\"MS Excel\") && access(DbPath+DbName,F_OK)!=0)
  {
    // error: db-file does not exist
    ISShowWarning(\"dbfilenotexist\",DbPath+DbName);
    return;
  }
    
  err=IS_OpenConnection(DbName, 
                        DbPath, 
                        DbType, 
                        DbUser, 
                        DbPassword, 
                        conn);
  if (err)
  {
    // error: deleting table
    adoShowError(conn);
    return;
  }

  switch (DbType)
  {
// !!! DB-specific
    case \"MS Access\"     : sql=\"DROP TABLE \"+TableName;
                           break;
    case \"MS Excel\"      : return;
                           sql=\"DROP TABLE \"+TableName;
                           break;
    case \"MS SQL-Server\" : sql=\"DROP TABLE \"+TableName;
                           break;
    case \"Oracle\"        : sql=\"DROP TABLE \"+TableName;
                           break;
    default              : return;
  }

  err=IS_Command2(conn, sql, err); 
  if (err)
  {
    // error: deleting table
    adoShowError(conn);
    dbCloseConnection(conn);
    return;
  }
  dbCloseConnection(conn);
  ISShowWarning(\"tabledeletedisdb\",TableName);

  IS_UpdateTableList(DbName,
                     DbPath,
                     DbType,
                     DbUser,
                     DbPassword,
                     TableName,
                     insert, // true==insert, false==delete
                     err);

  RootPanelOn(\"vision/is/IS_Para.pnl\",myModuleName(),
              makeDynString());
}

delDescription()
{
  int          err,i,pos,DbAlivePeriod;
  bool         exists,insert=false;
  string       TableName,AgTableName,AgDbName,Db,sql,
               DbName,DbPath,DbType,DbUser,DbPassword,dp;
  dyn_float    df;
  dyn_string   tables,ds,
               _IS_Db=dpNames(\"*\",\"_IS_Database\");
  dbConnection conn;

  ChildPanelOnCentralModalReturn(\"vision/is/IS_MessageInfo.pnl\",
    getCatStr(\"IS\",\"deletingdesc\"),
    makeDynString(getCatStr(\"IS\",\"deletedesc\"),
                  getCatStr(\"IS\",\"yes\"),
                  getCatStr(\"IS\",\"no\")),
    df,ds);
  if (df[1]!=1)
  {
    return;
  }
  
  ISActiveRegisterGlobal=0;
  getValue(\"DbName\",\"text\",Db);

  TableName=\"IS_Description\";
  if (Db==\"\")
  {
    // error: table name == \"\"
    ISShowWarning(\"emptydbname\",\"\");
    return;
  }

  dpGet(Db+\".DbName:_original.._value\",DbName,
        Db+\".DbPath:_original.._value\",DbPath,
        Db+\".DbType:_original.._value\",DbType,
        Db+\".DbUser:_original.._value\",DbUser,
        Db+\".DbPassword:_original.._value\",DbPassword,
        Db+\".DbAlivePeriod:_original.._value\",DbAlivePeriod);

  if ( (DbType==\"MS Access\" || DbType==\"MS Excel\") && access(DbPath+DbName,F_OK)!=0)
  {
    // error: db-file does not exist
    ISShowWarning(\"dbfilenotexist\",DbPath+DbName);
    return;
  }
    
  err=IS_OpenConnection(DbName, 
                        DbPath, 
                        DbType, 
                        DbUser, 
                        DbPassword, 
                        conn);
  if (err)
  {
    // error: deleting table
    adoShowError(conn);
    return;
  }

  switch (DbType)
  {
// !!! DB-specific
    case \"MS Access\"     : sql=\"DROP TABLE \"+TableName;
                           break;
    case \"MS Excel\"      : return;
                           sql=\"DROP TABLE \"+TableName;
                           break;
    case \"MS SQL-Server\" : sql=\"DROP TABLE \"+TableName;
                           break;
    case \"Oracle\"        : sql=\"DROP TABLE \"+TableName;
                           break;
    default              : return;
  }

  err=IS_Command2(conn, sql, err); 
  if (err)
  {
    // error: deleting table
    adoShowError(conn);
    dbCloseConnection(conn);
    return;
  }
  dbCloseConnection(conn);
  ISShowWarning(\"tabledeletedisdb\",TableName);
  RootPanelOn(\"vision/is/IS_Para.pnl\",myModuleName(),
              makeDynString());
}

actDescription()
{
  int          i,err;
  bool         show=true;
  string       AgDbName,DbName,DbFile,DbType,DbPath,DbUser,DbPassword;
  dyn_string   AgItems,ags=dpNames(\"*\",\"_IS_ArchiveGroup\");

  ISActiveRegisterGlobal=0;
  getMultiValue(\"DbName\",\"text\",DbName,
                \"DbType\",\"text\",DbType,
                \"DbPath\",\"text\",DbPath,
                \"DbUser\",\"text\",DbUser,
                \"DbPassword\",\"text\",DbPassword);

  for (i=1;i<=dynlen(ags);i++)
  {
    dpGet(ags[i]+\".AgDbName:_original.._value\",AgDbName,
          ags[i]+\".AgItems:_original.._value\",AgItems);

    if (AgDbName==DbName)
    {
      IS_UpdateDescription(DbName,
                           DbPath,
                           DbType,
                           DbUser,
                           DbPassword,
                           AgItems,
                           show, // == true - started from a panel
                           err);
    }
  }
}

delSyslogs()
{
  int          err;
  bool         show=true;
  string       DbName,DbType,DbPath,DbUser,DbPassword;

  ISActiveRegisterGlobal=0;
  getMultiValue(\"DbName\",\"text\",DbName,
                \"DbType\",\"text\",DbType,
                \"DbPath\",\"text\",DbPath,
                \"DbUser\",\"text\",DbUser,
                \"DbPassword\",\"text\",DbPassword);

  IS_DumpTransactionSQL(DbName,
                        DbPath,
                        DbType,
                        DbUser,
                        DbPassword,
                        err);
  if (err)
  {
    // error: db name == \"\"
    ISShowWarning(\"syslogstruncateerror\",DbName);
  }
}
" 0
 E 1 -1 -1 0  10 10
""
NC
DISPLAY_LAYER, 1 1 1 1 1 1 1 1
LAYER, 0 
2
LANG:0 6 Layer0
LANG:1 6 Layer0
6 0
"Border1"
""
21 61 E E E 1 E 1 E N "_Window" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 11 41 601 91
6 1
"Border2"
""
20 60 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 10 40 600 90
2 4
"Text1"
""
-603 125 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  20 135 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 6  Pfad:
LANG:1 6  Path:
2 18
"Text2"
""
20 -160 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 1 1 0 1 E U  1 E 0 0 0 "s" 0 0 0 0 0 0  10 10 1
2
LANG:0 68 -microsoft windows-arial-bold-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 68 -microsoft windows-arial-bold-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 24  Datenbankeinstellungen 
LANG:1 19  Database settings 
2 26
"Text3"
""
40 71 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  20 230 2
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 7  Alive-
LANG:1 6  Alive
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 8  Period:
LANG:1 8  period:
6 42
"Border3"
""
20 190 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 10 170 600 220
6 44
"Border4"
""
21 191 E E E 1 E 1 E N "_Window" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 11 171 601 221
2 46
"Text4"
""
-333 114 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  280 106 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 8  DB-Typ:
LANG:1 9  DB type:
2 48
"Text5"
""
-603 172 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  20 183 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 10  Benutzer:
LANG:1 6  User:
2 50
"Text6"
""
-324 173 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  272 183 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 10  Passwort:
LANG:1 10  Password:
6 53
"Border5"
""
20 110 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 10 90 600 170
6 54
"Border6"
""
21 111 E E E 1 E 1 E N "_Window" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 11 91 601 171
2 55
"Text7"
""
40 -26 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  20 105 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 9  DB-Name:
LANG:1 9  DB name:
2 57
"Text8"
""
30 -26 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  20 55 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 5  DBs:
LANG:1 5  DBs:
6 59
"Border7"
""
20 240 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 10 220 600 270
6 60
"Border8"
""
21 241 E E E 1 E 1 E N "_Window" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 11 221 601 271
2 65
"Text9"
""
213 77 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  205 236 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 12  Commit nach
LANG:1 13  Commit after
2 67
"Text10"
""
384 91 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  360 238 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 13 [s] oder nach
LANG:1 17 [s]      or after
2 74
"Text11"
""
620 128 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  550 238 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 6 Rekord
LANG:1 7 records
2 81
"Text12"
""
230 125 E E E 1 E 1 E N "_3DText" E N [0,0,0] E E
 E EE E 0 1 1 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  160 236 1
2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
2
LANG:0 6 [min].
LANG:1 6 [min].
13 36
"Button1"
""
982 722 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 490 360 600 387

T 
2
LANG:0 5 Hilfe
LANG:1 4 Help
"main()
{
  std_help(\"is_db_para\");
}" 0
 E E E
14 45
"DbPath"
""
182 262 E E E 1 E 1 E N "_WindowText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 90 130 480 159
2 "s" 0 0 0 0 0 -1  E E E
14 49
"DbUser"
""
182 362 E E E 1 E 1 E N "_WindowText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 90 180 250 209
2 "s" 0 0 0 0 0 -1  E E E
14 51
"DbPassword"
""
863.244837758112 362 E E E 1 E 1 E N "_WindowText" E N "_3DFace" E E
 E E2
LANG:0 72 -microsoft windows-pvsspwd-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 72 -microsoft windows-pvsspwd-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 340 180 480 209
2 "s" 0 0 0 0 0 -1  E E E
14 58
"DbName"
""
182 202 E E E 1 E 1 E N "_WindowText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 90 100 250 129
2 "s" 0 0 0 0 0 -1  E E E
21 69
"DbAlivePeriod"
""
182 462 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 90 230 150 259
0

E
E
E

N 1 120 1 5 0 1
21 70
"DbCommitPeriod"
""
582 462 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 290 230 350 259
0

E
E
E

N 1 3600 1 10 1 1
21 71
"DbCommitCount"
""
922 462 E E E 1 E 1 E N "_WindowText" E N "_Window" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 460 230 540 259
0

E
E
E

N 1 100000 1 10 1 1
13 73
"Button2"
""
742 722 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 370 360 480 387

T 
2
LANG:0 10 Übernehmen
LANG:1 4 Save
"main()
{
  int          i,err,
               DbAlivePeriod,DbCommitPeriod,DbCommitCount,
               DbAlivePeriod_old,DbCommitPeriod_old,DbCommitCount_old;
  bool         reload=false;
  string       DbName,DbFile,DbType,DbPath,DbUser,DbPassword;
  dyn_float    df;
  dyn_string   ds;

  ISActiveRegisterGlobal=0;
  getMultiValue(\"DbName\",\"text\",DbName,
                \"DbAlivePeriod\",\"text\",DbAlivePeriod,
                \"DbCommitPeriod\",\"text\",DbCommitPeriod,
                \"DbCommitCount\",\"text\",DbCommitCount,
                \"DbAlivePeriod_old\",\"text\",DbAlivePeriod_old,
                \"DbCommitPeriod_old\",\"text\",DbCommitPeriod_old,
                \"DbCommitCount_old\",\"text\",DbCommitCount_old);

  if (DbAlivePeriod==DbAlivePeriod_old &&
      DbCommitPeriod==DbCommitPeriod_old &&
      DbCommitCount==DbCommitCount_old)
  return;

  DbName=strltrim(strrtrim(DbName));
  if (DbName==\"\")
  {
    // error: db name == \"\"
    ISShowWarning(\"emptydbname\",\"\");
    return;
  }

  // Setting table datapoint 
  if (!dpExists(DbName) || dpTypeName(DbName)!=\"_IS_Database\")
  {
    // error: db name == \"\"
    ISShowWarning(\"dbdpnotexists\",DbName);
    return;
  }
  
  ChildPanelOnCentralModalReturn(\"vision/is/IS_MessageInfo.pnl\",
    getCatStr(\"IS\",\"changingdb\")+\" \"+DbName,
    makeDynString(getCatStr(\"IS\",\"changedb\"),
                  getCatStr(\"IS\",\"yes\"),
                  getCatStr(\"IS\",\"no\")),
    df,ds);
  if (df[1]!=1)
  {
    return;
  }
  
  ISDbGlobal=DbName;
  if (DbAlivePeriod!=DbAlivePeriod_old)
    dpSet(ISDbGlobal+\".DbAlivePeriod:_original.._value\",DbAlivePeriod*60,
          ISDbGlobal+\".DbAliveReset:_original.._value\",true);

  if (DbCommitPeriod!=DbCommitPeriod_old ||
      DbCommitCount!=DbCommitCount_old)
    dpSet(ISDbGlobal+\".DbCommitPeriod:_original.._value\",DbCommitPeriod,
          ISDbGlobal+\".DbCommitCount:_original.._value\",DbCommitCount,
          ISDbGlobal+\".DbCommitReset:_original.._value\",true);

  RootPanelOn(\"vision/is/IS_Para.pnl\",myModuleName(),
              makeDynString());
}
" 0
 E E E
22 75
"Databases"
""
182 102 E E E 1 E 1 E N [0,0,0] E N "_Window" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 90 50 250 79
0

E
"main()
{
  int        i,DbAlivePeriod=300,
             DbCommitPeriod=10,DbCommitCount=100;
  string     DbName=\"DB1\",
             DbType=\"MS Access\",
             DbPath=DATA_PATH,
             DbUser=\"\",DbPassword=\"\";
  dyn_string dbs;
  
  getValue(\"\",\"selectedPos\",i,
              \"items\",dbs);
              
  if (i<1)
  {
    i=dynContains(dbs,ISDbGlobal);
  }
  if (i<1)
  {
    if (dynlen(dbs)>0)
      i=1;
    else
      return;
  }
  ISDbGlobal=dbs[i];
  setValue(\"\",\"text\",ISDbGlobal,
              \"selectedPos\",i);

  if (!dpExists(ISDbGlobal) || dpTypeName(ISDbGlobal)!=\"_IS_Database\") return;
  
  dpGet(ISDbGlobal+\".DbName:_original.._value\",DbName,
        ISDbGlobal+\".DbType:_original.._value\",DbType,
        ISDbGlobal+\".DbPath:_original.._value\",DbPath,
        ISDbGlobal+\".DbUser:_original.._value\",DbUser,
        ISDbGlobal+\".DbPassword:_original.._value\",DbPassword,
        ISDbGlobal+\".DbAlivePeriod:_original.._value\",DbAlivePeriod,
        ISDbGlobal+\".DbCommitPeriod:_original.._value\",DbCommitPeriod,
        ISDbGlobal+\".DbCommitCount:_original.._value\",DbCommitCount);

  setMultiValue(\"DbName\",\"text\",ISDbGlobal,
                \"DbPath\",\"text\",DbPath,
                \"DbType\",\"text\",DbType,
                \"DbUser\",\"text\",DbUser,
                \"DbPassword\",\"text\",DbPassword,
                \"DbAlivePeriod\",\"text\",DbAlivePeriod/60,
                \"DbCommitPeriod\",\"text\",DbCommitPeriod,
                \"DbCommitCount\",\"text\",DbCommitCount);
}
  
" 0

E
 1 0
14 82
"DbType"
""
682 202 E E E 1 E 1 E N "_WindowText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 340 100 480 129
2 "s" 0 0 0 0 0 -1  E E E
14 83
"DbAlivePeriod_old"
""
182 542 E E E 1 E 0 E N "_WindowText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 90 270 140 299
2 "s" 0 0 0 0 0 -1  E E E
14 84
"DbCommitPeriod_old"
""
582 542 E E E 1 E 0 E N "_WindowText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 290 270 340 299
2 "s" 0 0 0 0 0 -1  E E E
14 85
"DbCommitCount_old"
""
922 542 E E E 1 E 0 E N "_WindowText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 460 270 510 299
2 "s" 0 0 0 0 0 -1  E E E
13 86
"Button3"
""
522 102 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 260 50 330 77

T 
2
LANG:0 3 Neu
LANG:1 3 New
"main()
{
  int        DbAlivePeriod,DbCommitPeriod,DbCommitCount,
             DbAlivePeriod_old,DbCommitPeriod_old,DbCommitCount_old;
  dyn_float  df;
  dyn_string ds;

  getMultiValue(\"DbAlivePeriod\",\"text\",DbAlivePeriod,
                \"DbCommitPeriod\",\"text\",DbCommitPeriod,
                \"DbCommitCount\",\"text\",DbCommitCount,
                \"DbAlivePeriod_old\",\"text\",DbAlivePeriod_old,
                \"DbCommitPeriod_old\",\"text\",DbCommitPeriod_old,
                \"DbCommitCount_old\",\"text\",DbCommitCount_old);

  if (DbAlivePeriod!=DbAlivePeriod_old ||
      DbCommitPeriod!=DbCommitPeriod_old ||
      DbCommitCount!=DbCommitCount_old)
  {
    ChildPanelOnCentralModalReturn(\"vision/is/IS_MessageInfo.pnl\",
      getCatStr(\"para\",\"warning\"),
      makeDynString(getCatStr(\"IS\",\"changed\"),
                    getCatStr(\"IS\",\"yes\"),
                    getCatStr(\"IS\",\"no\")),
      df,ds);
    if (df[1]==0)
      return;
  }
  
  ChildPanelOnCentralModalReturn(\"vision/is/IS_MessageInfo.pnl\",
    getCatStr(\"IS\",\"newdb\"),
    makeDynString(getCatStr(\"IS\",\"creatingnewdb\"),
                  getCatStr(\"IS\",\"yes\"),
                  getCatStr(\"IS\",\"no\")),
    df,ds);
  if (!df[1])
  {
    return;
  }
  
  ChildPanelOnCentralModalReturn(\"vision/is/IS_NewDb.pnl\",
    getCatStr(\"IS\",\"newdb\"),
    makeDynString(),
    df,ds);
  
  if (df[1]==-1) return;
  // error creating datapoint
  if (df[1]==-2)
  {
    ISShowWarning(\"errorcreatingdbdp\",ds[1]);
    return;
  }
  
  ISShowWarning(\"dbisnotactive\",\"\");
  RootPanelOn(\"vision/is/IS_Para.pnl\",myModuleName(),
              makeDynString());
}
" 0
 E E E
13 87
"delete"
""
682 102 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E E2
LANG:0 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
LANG:1 70 -microsoft windows-arial-medium-r-normal-*-*-120-100-100-*-*-iso8859-1
0
 340 50 410 77

T 
2
LANG:0 7 Löschen
LANG:1 6 Delete
"main()
{
  int          err,i,pos,DbAlivePeriod;
  bool         exists;
  string       TableName,AgTableName,AgDbName,Db,sql,
               DbName,DbPath,DbType,DbUser,DbPassword,dp;
  dyn_float    df;
  dyn_string   tables,ds,
               _IS_Db=dpNames(\"*\",\"_IS_Database\"),
               _IS_Table=dpNames(\"*\",\"_IS_Table\"),
               _IS_Ag=dpNames(\"*\",\"_IS_ArchiveGroup\");
  dbConnection conn;

  ISActiveRegisterGlobal=0;
  getValue(\"DbName\",\"text\",Db);

  Db=strltrim(strrtrim(Db));
  if (Db==\"\")
  {
    // error: Db name == \"\"
    ISShowWarning(\"emptydbname\",\"\");
    return;
  }

  // Deleting db datapoint 
  if (!dpExists(Db) || dpTypeName(Db)!=\"_IS_Database\")
  {
    // error: db does not exist
    ISShowWarning(\"dbdpnotexists\",Db);
    return;
  }

  for (i=1;i<=dynlen(_IS_Table);i++)
  {
    _IS_Table[i]=dpSubStr(_IS_Table[i],DPSUB_DP);
    if (strpos(_IS_Table[i],Db)==0)
    {
      // error: used table cannot be deleted
      ISShowWarning(\"useddbcannotbedeleted\",Db);
      return;
    }
  }

  for (i=1;i<=dynlen(_IS_Ag);i++)
  {
    dpGet(_IS_Ag[i]+\".AgTableName:_original.._value\",AgTableName,
          _IS_Ag[i]+\".AgDbName:_original.._value\",AgDbName);
    if  ( AgDbName==Db ||
          (dpExists(Db+\"_\"+AgTableName) &&
           dpTypeName(Db+\"_\"+AgTableName)==\"_IS_Table\") )
    {
      // error: used table cannot be deleted
      ISShowWarning(\"useddbcannotbedeleted\",Db);
      return;
    }
  }
  
  ChildPanelOnCentralModalReturn(\"vision/is/IS_MessageInfo.pnl\",
    getCatStr(\"IS\",\"deletingdb\")+\" \"+Db,
    makeDynString(getCatStr(\"IS\",\"deletedb\"),
                  getCatStr(\"IS\",\"yes\"),
                  getCatStr(\"IS\",\"no\")),
    df,ds);
  if (df[1]!=1)
  {
    return;
  }
  
  dpDelete(Db);
  ISShowWarning(\"dbdeleted\",Db);

  ISShowWarning(\"restartctrl\",\"\");
  RootPanelOn(\"vision/is/IS_Para.pnl\",myModuleName(),
              makeDynString());
}" 0
 E E E
0
LAYER, 1 
2
LANG:0 6 Layer1
LANG:1 6 Layer1
0
LAYER, 2 
2
LANG:0 6 Layer2
LANG:1 6 Layer2
0
LAYER, 3 
2
LANG:0 6 Layer3
LANG:1 6 Layer3
0
LAYER, 4 
2
LANG:0 6 Layer4
LANG:1 6 Layer4
0
LAYER, 5 
2
LANG:0 6 Layer5
LANG:1 6 Layer5
0
LAYER, 6 
2
LANG:0 6 Layer6
LANG:1 6 Layer6
0
LAYER, 7 
2
LANG:0 6 Layer7
LANG:1 6 Layer7
0
0