//**************************************************************************** // $Module type: CLASS // $Module name: cDbFormSchema.pkg // $Author : Nils G. Svedmyr // Created : 2002-07-21 @ 11:16 // // Description : // // $Rev History // 2002-07-21 Module header created //**************************************************************************** Use cRDSDbForm.pkg Class cDbFormSchema is a cRDSDbForm Procedure Construct_Object Forward Send Construct_Object Property Integer piDbType 0 // Visual DataFlex 12.0 Migration Utility, added March 28, 2007: 15:13:25 #IF (!@ >= 120) { InitialValue=True } #ENDIF Property Boolean pbFrom True Property Handle phoDD (Main_DD(Self)) Set Entry_msg To DoCheckEntering End_Procedure // Construct_Object Procedure End_Construct_Object Forward Send End_Construct_Object End_Procedure // End_Construct_Object Procedure DoCheckEntering // If Not (Enabled_State(Self)) Send Next End_Procedure // DoCheckEntering Procedure DoEnableDisable Integer iValue Set piDbType To iValue Set Enabled_State To (iValue > 1 And iValue < 6) Send DoSetDefaults End_Procedure // DoEnableDisable Procedure DoSetDefaults Handle hoDD Integer iType iFile iField String sValue sLabel Get phoDD To hoDD Get piDbType To iType Get Data_File To iFile Get Data_Field To iField Get Label To sLabel Case Begin Case (iType = 1) // DataFlex If (sLabel <> "Schema Name") Set Label To "Schema Name" Set Status_Help To ; ("Schema name.") Move "" To sValue Case Break Case (iType = 2) // IBM DB2 UDB If (sLabel <> "Schema Name") Set Label To "Schema Name" Set Status_Help To ; ("The name of the schema the table belongs to. A schema is a collection of" * ; "names or objects. A schema can contain tables, views, and triggers." * ; "Schemas provide a logical classification of objects in the database. If the" * ; "keyword is not set, the user ID used to login to DB2 is used as the schema name.") Get Network_User_Name To sValue Move (Uppercase(sValue)) To sValue Case Break Case (iType = 3) // MS SQL If (sLabel <> "Owner Name") Set Label To "Owner Name" Set Status_Help To ; ("Database Owner (dbo). The dbo is a user that has implied permissions to perform all" * ; "activities in the database. Any member of the sysadmin fixed server role who uses a" * ; "database is mapped to the special user inside each database called dbo. Also, any" * ; "object created by any member of the sysadmin fixed server role belongs to dbo automatically.") Move "dbo" To sValue Case Break Case (iType = 4) // ODBC If (sLabel <> "Schema Name") Set Label To "Schema Name" Set Status_Help To ; ("Schema name.") Move "" To sValue Case Break Case (iType = 5) // Oracle If (sLabel <> "Schema Name") Set Label To "Schema Name" Set Status_Help To ; ("Schema name.") Get Network_User_Name To sValue Case Break Case (iType = 6) // Pervasive If (sLabel <> "Schema Name") Set Label To "Schema Name" Set Status_Help To ; ("Schema name.") Move "" To sValue Case Break Case Else If (sLabel <> "Schema Name") Set Label To "Schema Name" Set Status_Help To ; ("Schema name. See the various database formats for more specific help.") Move "" To sValue Case End If Not (Current_Record(hoDD)) Set File_Field_Changed_Value Of hoDD iFile iField To sValue End_Procedure // DoSetDefaults End_Class // cDbFormSchema