V 8
2
LANG:0 0 
LANG:1 0 
PANEL,34 47 601 269 N "_3DFace" 0
"main()
{
  dyn_string _IS_Db=dpNames(\"*\",\"_IS_Database\");
  
  addGlobal(\"ISActiveRegisterGlobal\",INT_VAR);

  ISActiveRegisterGlobal=0;
  setMultiValue(\"DbName\",\"text\",\"\",
                \"DbPath\",\"text\",\"\",
                \"DbType\",\"text\",\"\",
                \"DbUser\",\"text\",\"\",
                \"DbPassword\",\"text\",\"\",
                \"DbAlivePeriod\",\"text\",5,
                \"DbCommitPeriod\",\"text\",10,
                \"DbCommitCount\",\"text\",10,
                \"filename\",\"items\",makeDynString(),
                \"Databases\",\"items\",makeDynString(),
                \"path\",\"items\",makeDynString(),
                \"type\",\"items\",makeDynString());
  setInputFocus(myModuleName(),myPanelName(),\"DbType\");
}" 0
 E E E E 1 -1 -1 0  20 80
""
DISPLAY_LAYER, 1 1 1 1 1 1 1 1
LAYER, 0 
2
LANG:0 0 
LANG:1 0 
13 0
""
""
490 230 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 230 590 257

T 
2
LANG:0 9 Abbrechen
LANG:1 6 Cancel
"main()
{
  PanelOffReturn(makeDynFloat(-1),makeDynString());
}" 0
 E E E
13 1
""
""
380 230 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
 380 230 480 257

T 
2
LANG:0 2 OK
LANG:1 2 OK
"main()
{
  int          TableMaxLengthDpeName,TableAlias,
               DbAlivePeriod,DbCommitPeriod,DbCommitCount,err;
  string       DbName,DbPath,DbType,DbUser,DbPassword,ext;

  getMultiValue(\"DbName\",\"text\",DbName,
                \"DbPath\",\"text\",DbPath,
                \"DbType\",\"text\",DbType,
                \"DbUser\",\"text\",DbUser,
                \"DbPassword\",\"text\",DbPassword,
                \"DbAlivePeriod\",\"text\",DbAlivePeriod,
                \"DbCommitPeriod\",\"text\",DbCommitPeriod,
                \"DbCommitCount\",\"text\",DbCommitCount,
                \"ext\",\"text\",ext);

  if (DbName==\"\")
  {
    ISShowWarning(\"emptydbname\",\"\");
    return;
  }

  if (dpCreate(DbName,\"_IS_Database\")==-1)
  {
    PanelOffReturn(makeDynFloat(-2),makeDynString());
    return;
  }

  dpSet(DbName+\".DbName:_original.._value\",DbName+ext,
        DbName+\".DbPath:_original.._value\",DbPath,
        DbName+\".DbType:_original.._value\",DbType,
        DbName+\".DbUser:_original.._value\",DbUser,
        DbName+\".DbPassword:_original.._value\",DbPassword,
        DbName+\".DbAlivePeriod:_original.._value\",DbAlivePeriod*60,
        DbName+\".DbCommitPeriod:_original.._value\",DbCommitPeriod,
        DbName+\".DbCommitCount:_original.._value\",DbCommitCount,
        DbName+\".DbAliveThreadNumber:_original.._value\",-1,
        DbName+\".DbCommitThreadNumber:_original.._value\",-1);
  ISDbGlobal=DbName;
  PanelOffReturn(makeDynFloat(1),
    makeDynString(DbName));
}
" 0
 E E E
2 2
""
""
-622.630149388863 -101 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  20 65 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:
6 4
""
""
10 20 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E 0.983050847457627 0 0.714285714285715 0.169491525423728 105.714285714286 0 E 10 20 600 90
6 5
""
""
10 20 E E E 1 E 1 E N "_Window" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E 0.983050847457627 0 0.714285714285715 1.16949152542373 106.714285714286 0 E 10 20 600 90
14 6
"DbPath"
""
20 80 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
 20 80 410 109
2 "s" 0 0 0 0 0 -1  E E E
2 8
""
""
-622.630149388863 -101.000000000001 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 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 10  Benutzer:
LANG:1 6  User:
14 9
"DbUser"
""
90 130 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 130 250 159
3 "s" 0 0 0 0 0 -1  E E E
2 10
""
""
-612.630149388863 -100 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  280 136 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:
14 11
"DbPassword"
""
350 130 E E E 1 E 1 E N "_WindowText" E N "_Window" 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
 350 130 535 159
3 "s" 0 0 0 0 0 -1  E E E
6 12
""
""
10 20 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E 0.983050847457627 0 1.42857142857142 0.169491525423728 -8.5714285714285 0 E 10 20 600 90
6 13
""
""
10 20 E E E 1 E 1 E N "_Window" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E 0.983050847457627 0 1.42857142857143 1.16949152542373 -7.5714285714285 0 E 10 20 600 90
14 14
"DbName"
""
250 30 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
 250 30 405 59
2 "s" 0 0 0 0 0 -1  E E E
6 15
""
""
10 20 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E 0.983050847457627 0 0.714285714285715 0.169491525423728 155.714285714286 0 E 10 20 600 90
6 16
""
""
10 20 E E E 1 E 1 E N "_Window" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E 0.983050847457627 0 0.714285714285715 1.16949152542373 156.714285714286 0 E 10 20 600 90
2 23
""
""
-712.630149388863 -363 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E U  1 E 0 0 0 "s" 0 0 0 0 0 0  20 10 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  Typ 
LANG:1 6  Type 
2 24
""
""
30 -232 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E U  1 E 0 0 0 "s" 0 0 0 0 0 0  250 10 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 
22 25
"DbType"
""
20 30 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
 20 30 180 59
4
2
LANG:0 9 MS Access
LANG:1 9 MS Access

1
2
LANG:0 8 MS Excel
LANG:1 8 MS Excel

0
2
LANG:0 13 MS SQL-Server
LANG:1 13 MS SQL-Server

0
2
LANG:0 6 Oracle
LANG:1 6 Oracle

0

E
"main()
{
  int        i,j=0,pos,
             DbAlivePeriod,DbCommitPeriod,DbCommitCount;
  string     dbtype,ext,db,fn,dp,pf,
             DbName,DbType,DbPath=DATA_PATH,DbUser,DbPassword;
  dyn_float  df;
  dyn_string filename,type,path,ds,dbname,
             _IS_Db=dpNames(\"*\",\"_IS_Database\");
  
  addGlobal(\"ISDbGlobal\",STRING_VAR);
  addGlobal(\"ISActiveRegisterGlobal\",INT_VAR);

  getValue(\"\",\"selectedText\",dbtype,
              \"selectedPos\",pos);
// !!! DB-specific
  if (pos==2)
  {
    ISShowWarning(\"dbnotimplemented\",db);
    setValue(\"\",\"text\",\"\");
    return;
  }

  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,
          _IS_Db[i]+\".DbPassword:_original.._value\",DbPassword,
          _IS_Db[i]+\".DbAlivePeriod:_original.._value\",DbAlivePeriod,
          _IS_Db[i]+\".DbCommitPeriod:_original.._value\",DbCommitPeriod,
          _IS_Db[i]+\".DbCommitCount:_original.._value\",DbCommitCount);
  }

  // 
  if (dynlen(filename)>4)
  {
    ISShowWarning(\"toomanydbs\",\"\");
    setValue(\"\",\"text\",\"\");
    return;
  }
  
  switch (dbtype)
  {
// !!! DB-specific
    case \"MS Access\"     : 
    case \"MS Excel\"      : if (dbtype==\"MS Access\")
                             ext=\".mdb\";
                           else
                             ext=\".xls\";
                           fileSelector(db,DATA_PATH,false,\"*\"+ext);
                           if (db==\"\")
                           {
                             setValue(\"\",\"text\",\"\");
                             return;
                           }
  
                           // wrong db-type selected in fileSelector
                           if (substr(db,strpos(db,ext),strlen(ext))!=ext)
                           {
                             ISShowWarning(\"wrongdbtype\",db);
                             setValue(\"\",\"text\",\"\");
                             return;
                           }

                           break;
    case \"MS SQL-Server\" : ext=\"\";
                           ChildPanelOnCentralModalReturn(\"vision/is/IS_NewGroup.pnl\",
                           getCatStr(\"IS\",\"dsnnewdb\"),makeDynString(),df,ds);
                           if (dynlen(ds)<1)
                             return;
                           else
                             db=ds[1];
                           break;
    case \"Oracle\"        : ext=\"\";
                           ChildPanelOnCentralModalReturn(\"vision/is/IS_NewGroup.pnl\",
                           getCatStr(\"IS\",\"dsnnewdb\"),makeDynString(),df,ds);
                           if (dynlen(ds)<1)
                             return;
                           else
                             db=ds[1];
                           break;
    default              : ext=\"\";
                           break;
  }

  setValue(\"ext\",\"text\",ext);  

  fn=IS_GetFileName(db);
  pos=dynContains(filename,fn);
  
  // db with another path
  if (pos>0 && IS_GetPathName(db)!=IS_GetPathName(path[pos]))
  {
    ISShowWarning(\"dbexistsinotherpath\",db);
    setValue(\"\",\"text\",\"\");
    return;
  }
  fn=IS_GetFileName(db);
  if (ext!=\"\") strreplace(fn,ext,\"\");
  if (!IS_CheckChar(fn))
  {
    // error: invalid character(s) in db name
    ISShowWarning(\"invalidchar\",\"\");
    setValue(\"\",\"text\",\"\");
    return;
  }

  // database found in IS
  if (pos>0 && IS_GetPathName(db)==IS_GetPathName(path[pos]))
  {
    ISShowWarning(\"dbdpexists\",fn);
    setValue(\"\",\"text\",\"\");
    return;
  }
  
  // dp exists
  if (dpExists(fn) && dpTypeName(fn)!=\"_IS_Database\")
  {
    ISShowWarning(\"dpnameoccupied\",fn);
    setValue(\"\",\"text\",\"\");
    return;
  }
  pf=db; strreplace(pf,fn+ext,\"\");
  setMultiValue(\"DbName\",\"text\",fn,
                \"DbPath\",\"text\",pf);
}
" 0

E
 0 0
17 26
"filename"
""
480 0 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
 480 0 520 30
0

E
E
E

3 1
17 27
"path"
""
520 0 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
 520 0 560 30
0

E
E
E

3 1
17 28
"type"
""
560 0 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
 560 0 600 30
0

E
E
E

3 1
14 29
"ext"
""
460 80 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 38 -*-fixed-medium-*-*--*-120-*-*-*-*-*-*
0
 460 80 530 109
2 "s" 0 0 0 0 0 -1  E E E
17 30
"Databases"
""
440 0 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
 440 0 480 30
0

E
E
E

3 1
2 31
""
""
20 -209 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  20 180 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 9  Periode:
LANG:1 8  period:
2 32
""
""
4 -158 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  201 187 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 33
""
""
25 -197 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  364 188 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 12 [s] or after
21 34
"DbAlivePeriod"
""
90 180 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 180 150 209
0

E
E
E

N 1 120 1 5 0 1
21 35
"DbCommitPeriod"
""
290 180 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 180 350 209
0

E
E
E

N 1 3600 1 10 1 1
21 36
"DbCommitCount"
""
455 180 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
 455 180 533 209
0

E
E
E

N 1 100000 1 10 1 1
2 37
""
""
64 -110 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  538 188 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 38
""
""
70 -161 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E
 E EE E 0 0 0 0 1 E U  0 E 0 0 0 "s" 0 0 0 0 0 0  160 186 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 [min]
LANG:1 5 [min]
0
LAYER, 1 
2
LANG:0 0 
LANG:1 0 
0
LAYER, 2 
2
LANG:0 0 
LANG:1 0 
0
LAYER, 3 
2
LANG:0 0 
LANG:1 0 
0
LAYER, 4 
2
LANG:0 0 
LANG:1 0 
0
LAYER, 5 
2
LANG:0 0 
LANG:1 0 
0
LAYER, 6 
2
LANG:0 0 
LANG:1 0 
0
LAYER, 7 
2
LANG:0 0 
LANG:1 0 
0
0