Use dfClient.pkg Use Windows.pkg Use IOForms\dirform.pkg Use IOForms\filform.pkg Use cWsProgressBar.pkg Activate_View Activate_Update_vw For Update_vw Object Update_vw is a dbView //Holds the fieldnumber for the choosen field that the missing fieldname is identical with. Property Integer piChoosenField public 0 //For errortreatment Property Integer error_processing_state public 0 Property Integer OldErrId public 0 Property Integer piActFilenumber public 0 Property String psActFilename public 0 Property String pTestfile public "" Set Label to "Databaseupdate" Set Location to 6 7 // Visual DataFlex 14.0 Client Size Adjuster, modified May 21, 2008: 15:56:53 // Set Size to 114 346 Set Size to 99 342 Object cnt3DBox is a Container3d Set Size to 78 337 Set Location to 2 2 Object frmDatabase is a FilForm Set Label to "Workspace to update:" Set Size to 13 233 Set Location to 6 98 Set Status_Help to "Choose the workspace that is to be updated." Set Label_Col_Offset to 3 Set Label_Justification_Mode to jMode_Right Set RegistrationValueName to "DatabaseWorkspace" Set Dialog_caption to "V‘lg workspace fil" Set Filter_String to "Workspace file(*.ws)|*.ws|Alle filer (*.*)|*.*" End_Object // frmDatabase Object DirInput is a dirform Set Label to "Directory for descriptionfiles:" Set Size to 13 233 Set Location to 25 98 Set Label_Col_Offset to 3 Set Label_Justification_Mode to jMode_Right Set RegistrationValueName to "Databasedesc" Set Dialog_caption to "Choose directory where the descriptionfiles are placed." End_Object // DirInput Object chkTest is a CheckBox Set Label to "Test" Set Size to 10 31 Set Location to 62 5 Set checked_state to True End_Object // chkTest Object pStatus is a cWsProgressBar Set piMaximum to 250 Set piAdvanceBy to 1 Set Location to 47 99 Set Size to 13 233 Set pbSmooth to True End_Object // pStatus Object Textbox1 is a Textbox Set Label to "Updated:" Set FontSize to 4 0 Set Location to 49 63 Set Size to 10 35 Set TypeFace to "MS Sans Serif" End_Object // Textbox1 Object Textbox2 is a Textbox Set Label to "DBfilestatus:" Set FontSize to 4 0 Set Location to 62 53 Set Size to 10 48 Set TypeFace to "MS Sans Serif" End_Object // Textbox2 Object pWorking is a cWsProgressBar Set piAdvanceBy to 1 Set Location to 62 99 Set Size to 6 233 Set pbSmooth to True End_Object // pWorking Object pCallback is a cWsProgressBar Function CallBack String callback_msg Integer callback_type Returns Integer Integer val1 val2 iCommaPos iCurrentpos Number nOffset Trim callback_msg to callback_msg If (Callback_type = DF_MESSAGE_PROGRESS_VALUE) Begin Pos "," in callback_msg to iCommaPos Left callback_msg to val1 (iCommaPos -1) Right callback_msg to val2 (Length(callback_msg)-iCommaPos) calc (val2 / 100) to nOffset Calc (val1 / nOffset) to iCurrentpos Set piPosition to iCurrentpos End Else Set piPosition to 0 Function_Return False //Continue the process End_Function Set piAdvanceBy to 1 Set Location to 68 99 Set Size to 6 233 Set pbSmooth to True End_Object // pCallback End_Object // cnt3DBox #Include Update.inc Object Button1 is a Button Set Label to "Start" Set Location to 82 80 Procedure OnClick String strTemp sInDir sTestfile sTest Integer iError Boolean bTest Get value of (frmdatabase(cnt3DBox(Self))) to strTemp Get value of (dirinput(cnt3DBox(Self))) to sInDir Get checked_state of (chkTest(cnt3DBox(Self))) to bTest If (bTest = True) Move "YES" to sTestMode Else Move "NO" to sTestMode If (Trim(strTemp) = "") Begin Increment iError Send info_box "Choose workspace." End If (Trim(sInDir) = "") Begin Increment iError Send info_box "Choose directory for the descriptionfiles." End If not iError Begin Send DoUpdate strTemp sInDir If (sTestMode = "YES") Begin Get pTestFile to sTestfile Insert (Character(32)) in sTestfile At 1 Append sTestfile (Character(32)) Send vShellExecute "OPEN" "Notepad.exe" sTestfile "" // Runprogram does not release focus End End End_Procedure End_Object // Button1 Object Button2 is a Button Set Label to "Exit" Set Location to 82 210 Procedure OnClick Send close_panel End_Procedure End_Object // Button2 End_Object // Update_vw