/* LoadInfo Editor - DMS - march 99 - by Sebastien DENEUX */ typeof open=ObjCheck;; typeof dbname=ObjText;; typeof dblogin=ObjText;; typeof dbpassw=ObjText;; typeof dbsql=ObjText;; /*-----------*/ fun save(s,n)= ("action"::"start"::"start"::nil):: ("action"::"destroy"::"destroy"::nil):: ("event"::"in"::"in"::nil):: ("event"::"destroyed"::"destroyed"::nil):: ("dbname"::(_GETtext dbname)::nil):: ("dblogin"::(_GETtext dblogin)::nil):: ("dbpassw"::(_GETtext dbpassw)::nil):: ("dbsql"::(_GETtext dbsql)::nil):: nil;; /*-----------*/ fun load (l)= _SETtext dbname getInfo l "dbname"; _SETtext dblogin getInfo l "dblogin"; _SETtext dbpassw getInfo l "dbpassw"; _SETtext dbsql getInfo l "dbsql"; 0;; /*-----------*/ fun IniEditor (filename)= let startEditor _channel nil nil nil 360 280 WN_NORMAL EDITOR_NORMAL filename "dms/db/loadinfo/loadinfo.dmc" nil nil @load @save nil -> ed in let getEditWin ed -> editWin in ( /* loc( _CRtext _channel editWin 5 5 140 15 ET_ALIGN_LEFT "DataBase Name"; ) */ _CRtext _channel editWin 5 5 140 15 ET_ALIGN_LEFT (_locEditor "380-LOADIN-databasena" nil); set dbname= _CReditLine _channel editWin 160 5 190 20 ET_DOWN|ET_AHSCROLL ""; /* loc( _CRtext _channel editWin 5 30 140 15 ET_ALIGN_LEFT "DataBase Login"; ) */ _CRtext _channel editWin 5 30 140 15 ET_ALIGN_LEFT (_locEditor "410-LOADIN-databaselo" nil); set dblogin=_CReditLine _channel editWin 160 30 190 20 ET_DOWN|ET_AHSCROLL ""; /* loc( _CRtext _channel editWin 5 55 140 30 ET_ALIGN_LEFT "DataBase Password"; ) */ _CRtext _channel editWin 5 55 140 30 ET_ALIGN_LEFT (_locEditor "440-LOADIN-databasepa" nil); set dbpassw=_CReditLine _channel editWin 160 60 190 20 ET_PASSWORD|ET_DOWN|ET_AHSCROLL ""; /* loc( _CRtext _channel editWin 5 90 100 15 ET_ALIGN_LEFT "SQL Request(s)"; ) */ _CRtext _channel editWin 5 90 100 15 ET_ALIGN_LEFT (_locEditor "470-LOADIN-sqlrequest" nil); set dbsql= _CReditText _channel editWin 5 115 350 160 ET_DOWN|ET_HSCROLL|ET_VSCROLL "object11\nSELECT object1 from tableUsers where login = ?\nobject22\nSELECT object2 from tableUsers where login = ?"; if filename==nil then nil else openDMI ed ); 0;;