//DDB-FileStart //DDB-HeaderStart // File Name : SNCTABLE.DD // Class Name: SncTable_DataDictionary // Revision : 204 // Version : 2 Use Windows // Basic Definitions Use DataDict.pkg // DataDictionary Class Definition Use DDvalTbl // Validation Table Class Definitions Open Snctable Open Sncthea Open Sncsys Open Sncschem //DDB-HeaderEnd //DDB-ValidationStart Register_Object Snctable_Synchtype_VT Register_Object Snctable_Dbtype_VT Object Snctable_Synchtype_VT is a DescriptionValidationTable Procedure Fill_List Forward Send Fill_List Send Add_Table_Value "1" "Matching Field Names" Send Add_Table_Value "2" "Range of Field Numbers" Send Add_Table_Value "3" "Selected Field Numbers" End_Procedure // Fill_List //DDB-ValidationCustomStart //DDB-ValidationCustomEnd End_Object // Snctable_Synchtype_VT Object Snctable_Dbtype_VT is a DescriptionValidationTable Procedure Fill_List Forward Send Fill_List Send Add_Table_Value "0" "" Send Add_Table_Value "1" "DataFlex Embedded Database" Send Add_Table_Value "2" "IBM DB2 Universal Database" Send Add_Table_Value "3" "Microsoft SQL Server" Send Add_Table_Value "4" "ODBC - Open DataBase Connectivity" Send Add_Table_Value "5" "Oracle" Send Add_Table_Value "6" "Pervasive.SQL (Btrieve)" End_Procedure // Fill_List //DDB-ValidationCustomStart //DDB-ValidationCustomEnd End_Object // Snctable_Dbtype_VT //DDB-ValidationEnd //DDB-SelectionStart //DDB/ ExternalSelectionList SNCTABLE_SL SNCTABLE.SL Register_Object SNCTABLE_SL //DDB-SelectionEnd Use SyncFuncs.pkg Use cRDSDataDictionary.pkg Class SncTable_DataDictionary Is A cRDSDataDictionary Procedure New_Current_Record Integer iOld Integer iNew String sFromPv sToPv Forward Send New_Current_Record iOld iNew If (Operation_Mode = Mode_Finding Or Operation_Mode = Mode_Saving) Begin // Get passwords: Get Field_Current_Value Field SncTable.FromPv To sFromPv Get Field_Current_Value Field SncTable.ToPv To sToPv // Decrypt passwords: If (Length(sFromPv) > 0) Begin Get CmNewDeKry sFromPv iNew To sFromPv // Display decrypted value and reset changed_state: Move sFromPv To SncTable.FromPv Set Field_Changed_Value Field SncTable.FromPv To sFromPv End // If (Length(sFromPv) > 0) Begin If (Length(sToPv) > 0) Begin Get CmNewDeKry sToPv iNew To sToPv // Display decrypted value and reset changed_state: Move sToPv To SncTable.ToPv Set Field_Changed_Value Field SncTable.ToPv To sToPv End // If (Length(sToPv) > 0) Begin End // If (Operation_Mode = Mode_Finding) Begin End_Procedure // New_Current_Record Procedure Update DateTime dtCurrentDateTime String sUser sDriver sFromPv sToPv Boolean bOpen Integer iFromItems iToItems iCount Forward Send Update // Encrypt passwords: Move (Trim(SncTable.FromPv)) To sFromPv If (Length(sFromPv) > 0) ; Get CmNewEnKry SncTable.FromPv SncTable.Recnum To SncTable.FromPv Move (Trim(SncTable.ToPv)) To sToPv If (Length(sToPv) > 0) ; Get CmNewEnKry SncTable.ToPv SncTable.Recnum To SncTable.ToPv If (SncTable.FromFile < 1 Or SncTable.ToFile < 1) Begin Move 10 To SncTable.FromFile Move 20 To SncTable.Tofile End // If (SncTable.FromFile < 1 Or SncTable.ToFile < 1) Begin If (SncTable.FromStartField Contains "<") Move 0 To SncTable.FromStartField If (SncTable.FromStopField Contains "<") Move 0 To SncTable.FromStopField If (SncTable.ToStartField Contains "<") Move 0 To SncTable.ToStartField // Disallow selected Oem/Ansi checkbox for the From file // if format is DataFlex. Should always be OEM: If (SncTable.FromDbType = 1 And SncTable.FrFileOemToAnsi = 1) ; Move 0 To SncTable.FrFileOemToAnsi If (Current_Record(Self)) Begin Move (CurrentDateTime()) To dtCurrentDateTime Move dtCurrentDateTime To SncTable.LastEdited Get Network_User_Name To sUser Move sUser To SncTable.EditedBy End // If (Current_Record(Self)) Begin Get CheckNoOfFields SncTable.SelFromFields To iFromItems Get CheckNoOfFields SncTable.SelToFields To iToItems If (SncTable.SynchType = 3 And iFromItems <> iToItems) Begin Error DfErr_Operator ("You need to select the same number of fields for the Source and Destination data table, on the 'Fields/Columns' tab-page. Selected Source fields =" * String(iFromItems) * "and selected Destination fields =" * String(iToItems)) Send Trap_Error Of Error_Info_Object 4100 // "Cannot find field". To not trigger error while trying to find a matching field name in ToFile. Procedure_Return End // If (SncTable.SynchType = 3 And iFromItems <> iToItems) Begin If (SncTable.Toidxselcount = 0) Begin Error DfErr_Operator "You need to first select a 'Source Database Table Index' on the 'Index/Sorting tab page, prior to saving this change." Procedure_Return End // If (SncTable.Toidxselcount = 0) Begin If (SncTable.Delete_Records And SncTable.Fridxselcount = 0) Begin Error DfErr_Operator "You need to select the 'Selected Destination Table Field Numbers' on the 'Index/Sorting tab page." Procedure_Return End // If (SncTable.Delete_Records And SncTable.Fridxselcount = 0) Begin If (Trim(SncTable.Constraints) = "") Move 0 To SncTable.ConstrainCount If (SncTable.ConstrainCount = 0) Move "" To SncTable.Constraints If (SncTable.CheckIntegrity = 0) Begin Move "" To SncTable.FromLayOut Move "" To SncTable.ToLayOut End // If Not SncTable.CheckIntegrity Begin Send DoPadSncScheme End_Procedure // Update Procedure Creating DateTime dtCurrentDateTime String sUser Forward Send Creating Move (CurrentDateTime()) To dtCurrentDateTime Move dtCurrentDateTime To SncTable.DateTime Get Network_User_Name To sUser Move sUser To SncTable.Createdby Send DoAddToSncScheme End_Procedure // Creating Procedure Deleting Forward Send Deleting If (SncSys.Table_Recid = SncTable.Recid) Begin Decrement SncSys.Table_Recid Saverecord SncSys End Send DoRemoveFromSncScheme End_Procedure // Deleting Procedure DoPadSncScheme Integer iRecords iLength String sTables sDeletes Get_Attribute DF_FILE_RECORDS_USED Of SncTable.File_Number To iRecords Constraint_Set Self Constrained_Find First SncSchem by Recnum While (Found) Move (Trim(SncSchem.Tables)) To sTables Move (Trim(SncSchem.Deletes)) To sDeletes If (Length(sTables) < iRecords Or Length(sDeletes) < iRecords) Begin Move (Pad(sTables, iRecords)) To sTables Move (Replaces(" ", sTables, "0")) To sTables Move sTables To SncSchem.Tables Move (Pad(sDeletes, iRecords)) To sDeletes Move (Replaces(" ", sDeletes, "0")) To sDeletes Move sDeletes To SncSchem.Deletes Saverecord SncSchem End // If (Length(sTables) < iRecords) Or Length(sDeletes) < iRecords) Begin Constrained_Find Next End // While (Found) End_Procedure // DoPadSncScheme Procedure DoAddToSncScheme Constraint_Set Self Constrained_Find First SncSchem by Recnum While (Found) Move (String(SncSchem.Tables) - "0") To SncSchem.Tables Move (String(SncSchem.Deletes) - "0") To SncSchem.Deletes Saverecord SncSchem Constrained_Find Next End // While (Found) End_Procedure // DoAddToSncScheme Procedure DoRemoveFromSncScheme String sTables sDeletes Constraint_Set Self Constrained_Find First SncSchem by Recnum While (Found) Move (Trim(SncSchem.Tables)) To sTables Move (Trim(SncSchem.Deletes)) To sDeletes Move (Left(sTables, (Length(sTables) -1))) To SncSchem.Tables Move (Left(sDeletes, (Length(sDeletes) -1))) To SncSchem.Deletes If Not (Length(sTables) > 0) Delete SncSchem // Delete if no SncTable records left. Else Saverecord SncSchem Constrained_Find Next End // While (Found) End_Procedure // DoRemoveFromSncScheme Procedure Request_Save Integer iCheck iErr Send DoShowStatusHelp "Saving data..." Indicate Err False Get Field_Current_Value Field SncTable.CheckIntegrity To iCheck If iCheck Begin Send Ignore_Error Of Error_Info_Object 4100 // "Cannot find field". To not trigger error while trying to find a matching field name in ToFile. Get UpdateIntegrityInfo To iErr Set Field_Changed_Value Field SncTable.FromLayout To SncTable.FromLayout Set Field_Changed_Value Field SncTable.ToLayout To SncTable.ToLayout Send Trap_Error Of Error_Info_Object 4100 Indicate Err As (iErr) End // If iCheck Begin Forward Send Request_Save If (Err) Send DoShowStatusHelp "Changes not saved." Else Send DoShowStatusHelp "Changes saved." End_Procedure // Request_Save Procedure Request_Delete If Not (Current_Record(Self)) Procedure_Return // Do nothing if no active record. Send DoShowStatusHelp "Deleting data..." Indicate Err False Forward Send Request_Delete If (Err) Send DoShowStatusHelp "Data not deleted." Else Send DoShowStatusHelp "Data deleted." If Not (Current_Record(Self) And Err) Begin Send Clear End End_Procedure // Request_Delete Procedure DoShowStatusHelp String sText Handle hoStatBar If (Current_Record(Self)) Begin Delegate Get Statusbar_Id To hoStatBar If hoStatBar Set Status_Help Of hoStatBar To sText End End_Procedure // DoShowStatusHelp Function Validate_Save Returns Integer Integer iRetval Forward Get Validate_Save To iRetval If Not iRetval Begin If (Trim(SncTable.Text) = "") Error DfErr_Operator "You need to enter a 'Description' on the 'Database Connection' tab-page." End Function_Return iRetval End_Function // Validate_Save // Returns the number of fields selected. // If fields have been appended, the field number is // preceded with a minus sign (-) and will not be counted. Function CheckNoOfFields String sSelFields Returns Integer Integer iRetval iMinusFields iPos Move (Trim(sSelFields)) To sSelFields If (Length(sSelFields) = 0) Function_Return 0 Repeat Move (Replace(" ", sSelFields, "")) To sSelFields Increment iRetval Until (Not(Pos(" ", sSelFields))) Increment iRetval Move (Pos("-", sSelFields)) To iPos If iPos Begin Repeat Move (Replace("-", sSelFields, "")) To sSelFields Increment iMinusFields Until (Not(Pos("-", sSelFields))) End // If iPos Begin Function_Return (iRetval - iMinusFields) End_Function // CheckNoOfFields Function CheckHighestFieldNumber String sSelFields Returns Integer Integer iRetval iPos iField Move (Trim(sSelFields)) To sSelFields If (sSelFields = "") Function_Return 0 Move (sSelFields + " ") To sSelFields Repeat Move (Pos(" ", sSelFields)) To iPos If iPos Begin Move (Left(sSelFields, (iPos - 1))) To iField If (iField > iRetval) Move iField To iRetval Move (Right(sSelFields, (Length(sSelFields) - iPos))) To sSelFields If (sSelFields = " ") Move 0 To iPos End // If iPos Begin Until (Not(iPos)) Function_Return iRetval End_Function // CheckHighestFieldNumber Function CheckHighestMatchField Integer iFromFile Integer iToFile Boolean bFrom Returns Integer Integer iRetval iCount iFields iFrField iToField iLastErr iErrorState iField iToFields Boolean bErr String sFieldName Handle hOldErrorObj Get_Attribute DF_FILE_NUMBER_FIELDS Of iFromFile To iFields For iCount From 1 To iFields Move iCount To iFrField Get_Attribute DF_FIELD_NAME Of iFromFile iCount To sFieldname Indicate Err False Field_Map iToFile sFieldName To iToField // Generates error 4100 if not found. Has been trapped. If (Err) Move -1 To iToField If (iToField >= 0) Begin If (bFrom And iFrField > iRetval) Move iFrField To iRetval // iFromFile field number Else If (iToField > iRetval) Move iToField To iRetval // iToFile field number End // If (iToField >= 0) Begin Loop Function_Return iRetval End_Function // CheckHighestMatchField Function UpdateIntegrityInfo Returns Integer String sFromLayout sToLayout sType sSelFields Integer iCount iType iFromStart iFromStop iToStop iFromFile iToFile Integer iLength iPrecision iOpen Get Field_Current_Value Field SncTable.SynchType To iType Get Field_Current_Value Field SncTable.FromFile To iFromFile Get Field_Current_Value Field SncTable.ToFile To iToFile If (Not(iFromFile) Or Not(iToFile)) Begin Error DfErr_Operator "Cannot update 'Check for database table layout changes' information. You need to select both a Source and a Destination table name." Function_Return 1 End // If (Not(iFromFile) Or Not(iToFile)) Begin Get_Attribute DF_FILE_OPENED Of iFromFile To iOpen If Not iOpen Begin Error DfErr_Operator "The Source data table is not open. Cannot update 'Check for database table layout changes' information\n(Checkbox on tab page 'Other')." Function_Return 1 End // If Not iOpen Begin Get_Attribute DF_FILE_OPENED Of iToFile To iOpen If Not iOpen Begin Error DfErr_Operator "The Destination data table is not open. Cannot update 'Check for database table layout changes' information." Function_Return 1 End // If Not iOpen Begin If (iType = 1) Begin // "Matching Field Names" Get CheckHighestMatchField iFromFile iToFile (True) To iFromStop Get CheckHighestMatchField iFromFile iToFile (False) To iToStop Send Trap_All Of Error_Info_Object End // If (iType = 1) Begin If (iType = 2) Begin // "Range of Field Numbers" Get Field_Current_Value Field SncTable.FromStartField To iFromStart Get Field_Current_Value Field SncTable.FromStopField To iFromStop Get Field_Current_Value Field SncTable.ToStartField To iToStop Move (iFromStop - iFromStart + iToStop) To iToStop End // If (iType = 2) Begin Else If (iType = 3) Begin // "Selected Fields Numbers" Get Field_Current_Value Field SncTable.SelFromFields To sSelFields Get CheckHighestFieldNumber sSelFields To iFromStop Get Field_Current_Value Field SncTable.SelToFields To sSelFields Get CheckHighestFieldNumber sSelFields To iToStop End // Else If (iType = 3) Begin If (iFromStop < 0 Or iToStop < 0) Begin Error DfErr_Operator "Cannot update 'Check for database table layout changes' information. One of the field numbers are negativ." Function_Return 1 End // If (iFromStop < 0 Or iToStop < 0) Begin For iCount From 1 To iFromStop Get_Attribute DF_FIELD_TYPE Of iFromFile iCount To iType Get_Attribute DF_FIELD_LENGTH Of iFromFile iCount To iLength Get_Attribute DF_FIELD_PRECISION Of iFromFile iCount To iPrecision Move (sFromLayout + "|" + String(iCount) * String(iType) * String(iLength) * String(iPrecision)) To sFromLayout Loop // For iCount from 1 to iFromStop Move (Right(sFromLayout, (Length(sFromLayout) - 1))) To SncTable.FromLayout For iCount From 1 To iToStop Get_Attribute DF_FIELD_TYPE Of iToFile iCount To iType Get_Attribute DF_FIELD_LENGTH Of iToFile iCount To iLength Get_Attribute DF_FIELD_PRECISION Of iToFile iCount To iPrecision Move (sToLayout + "|" + String(iCount) * String(iType) * String(iLength) * String(iPrecision)) To sToLayout Loop // For iCount from 1 to iToStop Move (Right(sToLayout, (Length(sToLayout) - 1))) To SncTable.ToLayout Function_Return 0 End_Function // UpdateIntegrityInfo // Define_Fields: // This procedure is used to set up all data-dictionary rules. Procedure Define_Fields Forward Send Define_Fields //DDB-Generated-Code-Location //DDB-DefineFieldStart Set Main_File To Snctable.File_Number Set Foreign_Field_Options DD_KEYFIELD To DD_AUTOFIND DD_NOPUT DD_FINDREQ Set Foreign_Field_Options DD_INDEXFIELD To DD_NOPUT DD_FINDREQ Set Foreign_Field_Options DD_DEFAULT To DD_DISPLAYONLY // Child (Client) file structure................ Send Add_Client_File Sncthea.File_Number // External (System) file structure............. Send Add_System_File Sncsys.File_Number DD_LOCK_ON_NEW_SAVE_DELETE Send Add_System_File Sncschem.File_Number DD_LOCK_ON_ALL Define_Auto_Increment Sncsys.Table_Recid To Snctable.Recid // Field-based properties....................... // Snctable.Recid Set Field_Class_Name Field Snctable.Recid To "cRdsdbForm" Set Field_Label_Long Field Snctable.Recid To "ID (Auto generated)" Set Field_Label_Short Field Snctable.Recid To "ID" Set Field_Options Field Snctable.Recid To DD_AUTOFIND Set Field_Prompt_Object Field Snctable.Recid To (SNCTABLE_SL(Self)) Set Status_Help Field Snctable.Recid To "Auto generated record id. Press F4 to display saved table setup records." // Snctable.Text Set Field_Class_Name Field Snctable.Text To "cRdsdbForm" Set Field_Label_Long Field Snctable.Text To "Name" Set Field_Label_Short Field Snctable.Text To "Name" Set Status_Help Field Snctable.Text To "This text will get displayed in the 'Collections of Database Connections' grid and in the Connect Engine program grid. If you fill in nothing, it will be automatically generated for you." // Snctable.Fromfile Set Field_Class_Name Field Snctable.Fromfile To "cDbFilelistComboForm" Set Field_Label_Long Field Snctable.Fromfile To "Source File Number" Set Field_Label_Short Field Snctable.Fromfile To "File number" Set Status_Help Field Snctable.Fromfile To "This is the table to read data from when running the Connection Engine." // Snctable.Fromstartfield Set Field_Class_Name Field Snctable.Fromstartfield To "cDbFieldComboForm" Set Field_Label_Long Field Snctable.Fromstartfield To "Source Start Field" Set Field_Label_Short Field Snctable.Fromstartfield To "Source Start Field" Set Status_Help Field Snctable.Fromstartfield To "Start field number for source table. Only used if field selection type is 1 - Range of field numbers." // Snctable.Fromstopfield Set Field_Class_Name Field Snctable.Fromstopfield To "cDbFieldComboForm" Set Field_Label_Long Field Snctable.Fromstopfield To "Source Stop Field" Set Field_Label_Short Field Snctable.Fromstopfield To "Source Stop Field" Set Status_Help Field Snctable.Fromstopfield To "Last field number for source table. Only used if field selection type is 1 - Range of field number." // Snctable.Fromindex Set Field_Class_Name Field Snctable.Fromindex To "cDbIndexComboForm" Set Field_Label_Long Field Snctable.Fromindex To "Select Unique Index" Set Field_Label_Short Field Snctable.Fromindex To "Source Index" Set Status_Help Field Snctable.Fromindex To "Select an unique index to use for the source table. Only used when 'Auto detete old records' has been selected." // Snctable.Tofile Set Field_Class_Name Field Snctable.Tofile To "cDbFilelistComboForm" Set Field_Label_Long Field Snctable.Tofile To "Target File Number" Set Field_Label_Short Field Snctable.Tofile To "Target file number" Set Status_Help Field Snctable.Tofile To "This is the table to connect data to." // Snctable.Tostartfield Set Field_Class_Name Field Snctable.Tostartfield To "cDbFieldComboForm" Set Field_Label_Long Field Snctable.Tostartfield To "Target Start Field" Set Field_Label_Short Field Snctable.Tostartfield To "Target Start Field" Set Status_Help Field Snctable.Tostartfield To "Start field number for target table. Only used if field selection type is 1 - Range of field numbers." // Snctable.Toindex Set Field_Class_Name Field Snctable.Toindex To "cDbIndexComboForm" Set Field_Label_Long Field Snctable.Toindex To "Select Unique Index" Set Field_Label_Short Field Snctable.Toindex To "Destination Index" Set Status_Help Field Snctable.Toindex To "Select an unique index. This is the index to use when finding an existing equal record in the target table when data are connected." // Snctable.Workspace Set Status_Help Field Snctable.Workspace To "Not used" // Snctable.Vdfver Set Status_Help Field Snctable.Vdfver To "Not used" // Snctable.Synchtype Set Field_Class_Name Field Snctable.Synchtype To "cRDSDbComboForm" Set Field_Label_Long Field Snctable.Synchtype To "Field Selection Type" Set Field_Value_Table Field Snctable.Synchtype To (Snctable_Synchtype_VT(Self)) Set Status_Help Field Snctable.Synchtype To "1 - Use all fields with the same name. 2 - Select a range of fields to use. 3 - Select individual fields to connect." // Snctable.Selfromfields Set Status_Help Field Snctable.Selfromfields To "Selected source fields" // Snctable.Seltofields Set Status_Help Field Snctable.Seltofields To "Selected target fields" // Snctable.Selfieldcount Set Field_Class_Name Field Snctable.Selfieldcount To "cRDSDbForm" Set Field_Label_Long Field Snctable.Selfieldcount To "Field Count" Set Field_Label_Short Field Snctable.Selfieldcount To "Count" Set Field_Options Field Snctable.Selfieldcount To DD_NOENTER DD_ZERO_SUPPRESS Set Status_Help Field Snctable.Selfieldcount To "Number of selected fields/columns." // Snctable.Fromfieldstoidx Set Field_Options Field Snctable.Fromfieldstoidx To DD_NOENTER Set Status_Help Field Snctable.Fromfieldstoidx To "Number of selected fields to load the source table's index fields (segments). Only used when 'Auto Delete old records' has benn checked." // Snctable.Toidxselcount Set Field_Class_Name Field Snctable.Toidxselcount To "cRDSDbForm" Set Field_Label_Long Field Snctable.Toidxselcount To "Select Count" Set Field_Label_Short Field Snctable.Toidxselcount To "Idx count" Set Field_Options Field Snctable.Toidxselcount To DD_NOENTER DD_ZERO_SUPPRESS Set Status_Help Field Snctable.Toidxselcount To "Number of selected fields to load the target table's index fields (segments)." // Snctable.Tofieldsfromidx Set Field_Options Field Snctable.Tofieldsfromidx To DD_NOENTER Set Status_Help Field Snctable.Tofieldsfromidx To "Selected fields to load the target table's index fields (segments)." // Snctable.Fridxselcount Set Field_Class_Name Field Snctable.Fridxselcount To "cRDSDbForm" Set Field_Label_Long Field Snctable.Fridxselcount To "Select Count" Set Field_Label_Short Field Snctable.Fridxselcount To "Idx count" Set Field_Options Field Snctable.Fridxselcount To DD_NOENTER DD_ZERO_SUPPRESS Set Status_Help Field Snctable.Fridxselcount To "Number of selected fields to load source table's index fields (segments)." // Snctable.Frfileoemtoansi Set Field_Checkbox_Values Field Snctable.Frfileoemtoansi To "1" "0" Set Field_Class_Name Field Snctable.Frfileoemtoansi To "cRDSDbCheckBox" Set Field_Label_Long Field Snctable.Frfileoemtoansi To "Data Saved in ANSI Format" Set Status_Help Field Snctable.Frfileoemtoansi To "Defines in what format data was stored in the source data table. OEM also known as 'DOS-format' or ANSI which is the format Windows uses." // Snctable.Tofileoemtoansi Set Field_Checkbox_Values Field Snctable.Tofileoemtoansi To "1" "0" Set Field_Class_Name Field Snctable.Tofileoemtoansi To "cRDSDbCheckBox" Set Field_Label_Long Field Snctable.Tofileoemtoansi To "Save Data in ANSI Format" Set Status_Help Field Snctable.Tofileoemtoansi To "Defines in what format data should be stored in the target data table. Unchecked=OEM or 'DOS-format' and checked=ANSI which is the format used by Windows." // Snctable.Delete_Records Set Field_Checkbox_Values Field Snctable.Delete_Records To "1" "0" Set Field_Class_Name Field Snctable.Delete_Records To "cRDSDbCheckBox" Set Field_Label_Long Field Snctable.Delete_Records To "Auto Delete Old Records" Set Field_Label_Short Field Snctable.Delete_Records To "Auto Delete" Set Status_Help Field Snctable.Delete_Records To "Delete records in the target data table that is missing in the source data table. Note: This will add approximately an extra 60% to the total connection time." // Snctable.Zerolengthok Set Field_Checkbox_Values Field Snctable.Zerolengthok To "1" "0" Set Field_Class_Name Field Snctable.Zerolengthok To "cRDSDbCheckBox" Set Field_Label_Long Field Snctable.Zerolengthok To "Null Defaults Specified" Set Field_Options Field Snctable.Zerolengthok To DD_NOENTER Set Status_Help Field Snctable.Zerolengthok To "Has default values been specified for 'Null' values?" // Snctable.Fromlogin Set Field_Class_Name Field Snctable.Fromlogin To "cRDSDbForm" Set Field_Label_Long Field Snctable.Fromlogin To "Login" Set Field_Label_Short Field Snctable.Fromlogin To "Login" Set Status_Help Field Snctable.Fromlogin To "Login parameters. Only available for database formats other than Dataflex." // Snctable.Tologin Set Field_Class_Name Field Snctable.Tologin To "cRDSDbForm" Set Field_Label_Long Field Snctable.Tologin To "Login" Set Field_Label_Short Field Snctable.Tologin To "Login" Set Status_Help Field Snctable.Tologin To "Login parameters. Only available for database formats other than Dataflex." // Snctable.Constraints Set Status_Help Field Snctable.Constraints To "Filters. Used to filter the source table records that should be read when connecting data." // Snctable.Constraincount Set Field_Class_Name Field Snctable.Constraincount To "cRDSDbForm" Set Field_Label_Long Field Snctable.Constraincount To "Selected Number of Filters" Set Field_Options Field Snctable.Constraincount To DD_NOENTER DD_ZERO_SUPPRESS Set Status_Help Field Snctable.Constraincount To "Selected number of filters" // Snctable.Fromowner Set Field_Class_Name Field Snctable.Fromowner To "cDbFormSchema" Set Field_Label_Long Field Snctable.Fromowner To "Schema/Owner" Set Field_Label_Short Field Snctable.Fromowner To "Schema/Owner" Set Status_Help Field Snctable.Fromowner To "Schema or Owner of the source database table" // Snctable.Toowner Set Field_Class_Name Field Snctable.Toowner To "cDbFormSchema" Set Field_Label_Long Field Snctable.Toowner To "Schema/Owner" Set Field_Label_Short Field Snctable.Toowner To "Schema/Owner" Set Status_Help Field Snctable.Toowner To "Schema or Owner of the target database table" // Snctable.Todefaults Set Status_Help Field Snctable.Todefaults To "Default values to use for the target data table when an undefined or 'Null' value is found in the source data table." // Snctable.Hide Set Field_Checkbox_Values Field Snctable.Hide To "1" "0" Set Field_Class_Name Field Snctable.Hide To "cRDSDbCheckBox" Set Field_Label_Long Field Snctable.Hide To "Hide Record" Set Field_Label_Short Field Snctable.Hide To "Hide" Set Status_Help Field Snctable.Hide To "Hide this record from the 'Collections of Database Connections' grid and from the Connection Engine grid." // Snctable.Fromdriver Set Field_Class_Name Field Snctable.Fromdriver To "cDbComboformDriver" Set Field_Label_Long Field Snctable.Fromdriver To "Database Driver" Set Field_Label_Short Field Snctable.Fromdriver To "Database Driver" Set Status_Help Field Snctable.Fromdriver To "Driver DLL to use for the source database table." // Snctable.Todriver Set Field_Class_Name Field Snctable.Todriver To "cDbComboformDriver" Set Field_Label_Long Field Snctable.Todriver To "Database Driver" Set Field_Label_Short Field Snctable.Todriver To "Database Driver" Set Status_Help Field Snctable.Todriver To "Driver DLL to use for the target database table." // Snctable.Sncthea_Count Set Field_Class_Name Field Snctable.Sncthea_Count To "cRDSDbForm" Set Field_Label_Long Field Snctable.Sncthea_Count To "No of Transformation Tables" Set Field_Options Field Snctable.Sncthea_Count To DD_NOENTER DD_ZERO_SUPPRESS Set Status_Help Field Snctable.Sncthea_Count To "Number of value transformation tabels created." // Snctable.Checkintegrity Set Field_Checkbox_Values Field Snctable.Checkintegrity To "1" "0" Set Field_Class_Name Field Snctable.Checkintegrity To "cRDSDbCheckBox" Set Field_Label_Long Field Snctable.Checkintegrity To "Check For Database Table Layout Changes before Connecting" Set Field_Label_Short Field Snctable.Checkintegrity To "db Integrity" Set Status_Help Field Snctable.Checkintegrity To "Check for database table layout changes before connecting data. Checks that no selected fields for the two tables have been changed after this record was last edited." // Snctable.Fromlayout // Snctable.Tolayout // Snctable.Fromfilepath Set Field_Class_Name Field Snctable.Fromfilepath To "cDbFormPath" Set Field_Label_Long Field Snctable.Fromfilepath To "Table Path" Set Field_Label_Short Field Snctable.Fromfilepath To "Table Path" Set Status_Help Field Snctable.Fromfilepath To "Name and full path to the source data table. Only for database formats 'DataFlex' and 'Pervasive.SQL'." // Snctable.Tofilepath Set Field_Class_Name Field Snctable.Tofilepath To "cDbFormPath" Set Field_Label_Long Field Snctable.Tofilepath To "Table Path" Set Field_Label_Short Field Snctable.Tofilepath To "Table Path" Set Status_Help Field Snctable.Tofilepath To "Name and full path to the source data table. Only for database formats 'DataFlex' and 'Pervasive.SQL'" // Snctable.Interface //DDB/ Comment_Short Field Snctable.Interface To "Obsolete" // Snctable.Fromdatatable Set Field_Class_Name Field Snctable.Fromdatatable To "cDbComboformDataTable" Set Field_Label_Long Field Snctable.Fromdatatable To "Source Table Name" Set Field_Label_Short Field Snctable.Fromdatatable To "Table Name" Set Status_Help Field Snctable.Fromdatatable To "Name of the source database table. Note: You need to open and close the list for changes to take effect." // Snctable.Todatatable Set Field_Class_Name Field Snctable.Todatatable To "cDbComboformDataTable" Set Field_Label_Long Field Snctable.Todatatable To "Target Table Name" Set Field_Label_Short Field Snctable.Todatatable To "Table Name" Set Status_Help Field Snctable.Todatatable To "Name of the target database table. Note: You need to open and close the list for changes to take effect." // Snctable.Frompv Set Field_Class_Name Field Snctable.Frompv To "cDbFormPassword" Set Field_Label_Long Field Snctable.Frompv To "Password" Set Field_Label_Short Field Snctable.Frompv To "Password" Set Status_Help Field Snctable.Frompv To "Password for the source database" // Snctable.Topv Set Field_Class_Name Field Snctable.Topv To "cDbFormPassword" Set Field_Label_Long Field Snctable.Topv To "Password" Set Field_Label_Short Field Snctable.Topv To "Password" Set Status_Help Field Snctable.Topv To "Password for the target database" // Snctable.Fromdbtype Set Field_Class_Name Field Snctable.Fromdbtype To "cDbComboformFormat" Set Field_Label_Long Field Snctable.Fromdbtype To "Database Format" Set Field_Label_Short Field Snctable.Fromdbtype To "Source Format" Set Field_Value_Table Field Snctable.Fromdbtype To (Snctable_Dbtype_VT(Self)) Set Status_Help Field Snctable.Fromdbtype To "Select the appropriate format from the list. If you don't find the needed Database Format select 'Other - ODBC - Open DataBase Connectivity' and connect with an installed ODBC driver. Note: You need to open and close the list for changes to take effect." // Snctable.Todbtype Set Field_Class_Name Field Snctable.Todbtype To "cDbComboformFormat" Set Field_Label_Long Field Snctable.Todbtype To "Database Format" Set Field_Label_Short Field Snctable.Todbtype To "Target Format" Set Field_Value_Table Field Snctable.Todbtype To (Snctable_Dbtype_VT(Self)) Set Status_Help Field Snctable.Todbtype To "Select the appropriate format from the list. If you don't find the needed Database Format select 'Other - ODBC - Open DataBase Connectivity' and connect with an installed ODBC driver. Note: You need to open and close the list for changes to take effect." // Snctable.Fromserver Set Field_Class_Name Field Snctable.Fromserver To "cDbComboformServer" Set Field_Label_Long Field Snctable.Fromserver To "Server" Set Field_Label_Short Field Snctable.Fromserver To "Server" Set Status_Help Field Snctable.Fromserver To "Database Server or DSN (Data Source Name) for the source database table." // Snctable.Toserver Set Field_Class_Name Field Snctable.Toserver To "cDbComboformServer" Set Field_Label_Long Field Snctable.Toserver To "Server" Set Field_Label_Short Field Snctable.Toserver To "Server" Set Status_Help Field Snctable.Toserver To "Database Server or DSN (Data Source Name) for the target database table." // Snctable.Fromuser Set Field_Class_Name Field Snctable.Fromuser To "cDbFormUser" Set Field_Label_Long Field Snctable.Fromuser To "User Name" Set Field_Label_Short Field Snctable.Fromuser To "User Name" Set Status_Help Field Snctable.Fromuser To "The user name for logging into the source database table." // Snctable.Touser Set Field_Class_Name Field Snctable.Touser To "cDbFormUser" Set Field_Label_Long Field Snctable.Touser To "User Name" Set Field_Label_Short Field Snctable.Touser To "User Name" Set Status_Help Field Snctable.Touser To "The user name for logging into the target database table." // Snctable.Fromntauth Set Field_Checkbox_Values Field Snctable.Fromntauth To "1" "0" Set Field_Class_Name Field Snctable.Fromntauth To "cRDSDbCheckBox" Set Field_Label_Long Field Snctable.Fromntauth To "Use Windows NT Authentication" Set Field_Label_Short Field Snctable.Fromntauth To "NT authentication" Set Status_Help Field Snctable.Fromntauth To "Use NT Authentication when logging into the source database. This is the same as using Windows login info." // Snctable.Tontauth Set Field_Checkbox_Values Field Snctable.Tontauth To "1" "0" Set Field_Class_Name Field Snctable.Tontauth To "cRDSDbCheckBox" Set Field_Label_Long Field Snctable.Tontauth To "Use Windows NT Authentication" Set Field_Label_Short Field Snctable.Tontauth To "NT authentication" Set Status_Help Field Snctable.Tontauth To "Use NT Authentication when logging into the target database. This is the same as using Windows login info." // Snctable.Synchflags // Snctable.Synchflagcount Set Field_Label_Long Field Snctable.Synchflagcount To "Number of Selected Fields" Set Field_Options Field Snctable.Synchflagcount To DD_NOENTER DD_ZERO_SUPPRESS Set Status_Help Field Snctable.Synchflagcount To "Number of selected target flag fields." // Snctable.Fromdsntype // Snctable.Todsntype // Snctable.Fromdatabase Set Field_Class_Name Field Snctable.Fromdatabase To "cDbComboFormDatabase" Set Field_Label_Long Field Snctable.Fromdatabase To "Database Name" Set Field_Label_Short Field Snctable.Fromdatabase To "Database" Set Status_Help Field Snctable.Fromdatabase To "Only for MS SQL. The name of the database where the SQL Server tables have been placed." // Snctable.Todatabase Set Field_Class_Name Field Snctable.Todatabase To "cDbComboFormDatabase" Set Field_Label_Long Field Snctable.Todatabase To "Database Name" Set Field_Label_Short Field Snctable.Todatabase To "Database" Set Status_Help Field Snctable.Todatabase To "Only for MS SQL. The name of the database where the SQL Server tables have been placed." // Snctable.Sortfield Set Field_Class_Name Field Snctable.Sortfield To "cRDSDbForm" Set Field_Label_Long Field Snctable.Sortfield To "Sort Name" Set Field_Label_Short Field Snctable.Sortfield To "Sort Name" Set Field_Prompt_Object Field Snctable.Sortfield To (SNCTABLE_SL(Self)) Set Status_Help Field Snctable.Sortfield To "Optional. Enter a name to sort this record in the 'Collections of Database Connections' grid and in the Connection Engine grid." // Snctable.Datetime Set Field_Label_Long Field Snctable.Datetime To "Record Created" Set Field_Label_Short Field Snctable.Datetime To "Created" Set Field_Options Field Snctable.Datetime To DD_NOENTER Set Status_Help Field Snctable.Datetime To "The date and time when this connect record was created." // Snctable.Createdby Set Field_Label_Long Field Snctable.Createdby To "By" Set Field_Label_Short Field Snctable.Createdby To "By" Set Field_Options Field Snctable.Createdby To DD_NOENTER Set Status_Help Field Snctable.Createdby To "The network user name of the logged in person that created this record." // Snctable.Lastedited Set Field_Label_Long Field Snctable.Lastedited To "Last Edited" Set Field_Label_Short Field Snctable.Lastedited To "Last Edited" Set Field_Options Field Snctable.Lastedited To DD_NOENTER Set Status_Help Field Snctable.Lastedited To "The date and time when this connect record was last edited." // Snctable.Editedby Set Field_Label_Long Field Snctable.Editedby To "By" Set Field_Label_Short Field Snctable.Editedby To "By" Set Field_Options Field Snctable.Editedby To DD_NOENTER Set Status_Help Field Snctable.Editedby To "The network user name of the logged in person that last edited this record" // Snctable.Notes Set Field_Class_Name Field Snctable.Notes To "cRDSDbEdit" Set Field_Label_Long Field Snctable.Notes To "Notes" Set Field_Label_Short Field Snctable.Notes To "Notes" Set Status_Help Field Snctable.Notes To "Here you can enter your personal notes about the connection record." //DDB-DefineFieldEnd // This is needed for text fields: Send DefineAllExtendedFields End_Procedure // Define_Fields // Field_Defaults: // This procedure is used to establish default field values. Procedure Field_Defaults Forward Send Field_Defaults //DDB-Generated-Code-Location //DDB-FieldDefaultStart Set Field_Changed_Value Field Snctable.Fromfile To 10 Set Field_Changed_Value Field Snctable.Tofile To 20 Set Field_Changed_Value Field Snctable.Synchtype To 1 Set Field_Changed_Value Field Snctable.Frfileoemtoansi To 0 Set Field_Changed_Value Field Snctable.Tofileoemtoansi To 0 Set Field_Changed_Value Field Snctable.Delete_Records To 0 Set Field_Changed_Value Field Snctable.Zerolengthok To 0 Set Field_Changed_Value Field Snctable.Hide To 0 Set Field_Changed_Value Field Snctable.Checkintegrity To 1 Set Field_Changed_Value Field Snctable.Interface To 0 Set Field_Changed_Value Field Snctable.Fromdbtype To 0 Set Field_Changed_Value Field Snctable.Todbtype To 0 Set Field_Changed_Value Field Snctable.Fromntauth To 0 Set Field_Changed_Value Field Snctable.Tontauth To 0 Set Field_Changed_Value Field Snctable.Fromdsntype To 0 Set Field_Changed_Value Field Snctable.Todsntype To 0 //DDB-FieldDefaultEnd End_Procedure // Field_Defaults End_Class // Snctable_DataDictionary //DDB-Selection-pkg-Start #IFDEF Is$WebApp #ELSE Use SNCTABLE.SL // SNCTABLE_SL #ENDIF //DDB-Selection-pkg-End //DDB-FileEnd