MODIFIED SOURCE CODE FOR DCPROP.FRM

Made on Tuesday, Apr 8, 2003 at 9:43 AM

http://www.resourcemining.com

DCPROP.FRM contained 42 resource strings and 3 non-user interface strings.

Option Explicit
'>>>>>>>>>>>>>>>>>>>>>>>>
'ResMe Converted To A Property: Const FORMCAPTION = "Data Control Properties"
'ResMe Converted To A Property: Const BUTTON1 = "&Refresh Data Control"
'ResMe Converted To A Property: Const BUTTON2 = "&Cancel"
'ResMe Converted To A Property: Const Label1 = "Database Properties"
'ResMe Converted To A Property: Const Label2 = "Recordset Properties"
'ResMe Converted To A Property: Const LABEL3 = "Data Control Properties"
'ResMe Converted To A Property: Const LABEL4 = "Bound Binary Control Type:"

'>>>>>>>>>>>>>>>>>>>>>>>>


Sub cmdCancel_Click()
  Set gDataCtlObj = Nothing
  Unload Me
End Sub

Sub cmdRefresh_Click()
  On Error GoTo RefErr

  gbSettingDataCtl = True
  gDataCtlObj.DatabaseName = txtDatabaseName.Text
  gDataCtlObj.Connect = txtConnect.Text
  gDataCtlObj.Exclusive = IIf(chkExclusive.Value = vbUnchecked, 0, -1)
  gDataCtlObj.ReadOnly = IIf(chkDBReadOnly.Value = vbUnchecked, 0, -1)
  
  gDataCtlObj.RecordSource = txtRecordSource.Text
  If optRSType(0).Value Then
    gDataCtlObj.RecordsetType = 0
  ElseIf optRSType(1).Value Then
    gDataCtlObj.RecordsetType = 1
  Else
    gDataCtlObj.RecordsetType = 2
  End If
  
  gDataCtlObj.Options = 0
  'set the selected options
  If chkDenyWrite.Value = vbChecked Then
    gDataCtlObj.Options = gDataCtlObj.Options Or dbDenyWrite
  End If
  If chkDenyRead.Value = vbChecked Then
    gDataCtlObj.Options = gDataCtlObj.Options Or dbDenyRead
  End If
  If chkReadOnly.Value = vbChecked Then
    gDataCtlObj.Options = gDataCtlObj.Options Or dbReadOnly
  End If
  If chkAppendOnly.Value = vbChecked Then
    gDataCtlObj.Options = gDataCtlObj.Options Or dbAppendOnly
  End If
  If chkInconsistent.Value = vbChecked Then
    gDataCtlObj.Options = gDataCtlObj.Options Or dbInconsistent
  End If
  If chkConsistent.Value = vbChecked Then
    gDataCtlObj.Options = gDataCtlObj.Options Or dbConsistent
  End If
  If chkSQLPassthrough.Value = vbChecked Then
    gDataCtlObj.Options = gDataCtlObj.Options Or dbSQLPassThrough
  End If
  If chkFailOnError.Value = vbChecked Then
    gDataCtlObj.Options = gDataCtlObj.Options Or dbFailOnError
  End If
  If chkForwardOnly.Value = vbChecked Then
    gDataCtlObj.Options = gDataCtlObj.Options Or dbForwardOnly
  End If

  If optBOFAction(0).Value Then
    gDataCtlObj.BOFAction = 0
  Else
    gDataCtlObj.BOFAction = 1
  End If
  If optEOFAction(0).Value Then
    gDataCtlObj.EOFAction = 0
  ElseIf optEOFAction(1).Value Then
    gDataCtlObj.EOFAction = 1
  Else
    gDataCtlObj.EOFAction = 2
  End If

  gDataCtlObj.Tag = IIf(optOLECtl.Value, "OLE", "PIC")
  
  Unload Me
  Exit Sub
  
RefErr:
  gbSettingDataCtl = False
  ShowError
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyF1 And Shift = 0 Then
    DisplayTopic 2016124
  End If
End Sub

Sub Form_Load()
    'ResMe autogenerated line of code to call the initialization routine that was automatically generated.
    Call frmDataCtlProp_Auto_Init

  Me.Caption = FORMCAPTION
  cmdRefresh.Caption = BUTTON1
  cmdCancel.Caption = BUTTON2
  lblLabels(7).Caption = Label1
  lblLabels(10).Caption = Label2
  lblLabels(8).Caption = LABEL3
  lblLabels(9).Caption = LABEL4
  

  txtDatabaseName.Text = gDataCtlObj.DatabaseName
  txtConnect.Text = gDataCtlObj.Connect
  chkExclusive.Value = IIf(gDataCtlObj.Exclusive, 1, 0)
  chkDBReadOnly.Value = IIf(gDataCtlObj.ReadOnly, 1, 0)
  
  txtRecordSource.Text = gDataCtlObj.RecordSource
  optRSType(gDataCtlObj.RecordsetType).Value = True
  If (gDataCtlObj.Options And dbDenyWrite) = dbDenyWrite Then
    chkDenyWrite.Value = vbChecked
  End If
  If (gDataCtlObj.Options And dbDenyRead) = dbDenyRead Then
    chkDenyRead.Value = vbChecked
  End If
  If (gDataCtlObj.Options And dbReadOnly) = dbReadOnly Then
    chkReadOnly.Value = vbChecked
  End If
  If (gDataCtlObj.Options And dbAppendOnly) = dbAppendOnly Then
    chkAppendOnly.Value = vbChecked
  End If
  If (gDataCtlObj.Options And dbInconsistent) = dbInconsistent Then
    chkInconsistent.Value = vbChecked
  End If
  If (gDataCtlObj.Options And dbConsistent) = dbConsistent Then
    chkConsistent.Value = vbChecked
  End If
  If (gDataCtlObj.Options And dbSQLPassThrough) = dbSQLPassThrough Then
    chkSQLPassthrough.Value = vbChecked
  End If
  If (gDataCtlObj.Options And dbFailOnError) = dbFailOnError Then
    chkFailOnError.Value = vbChecked
  End If
  If (gDataCtlObj.Options And dbForwardOnly) = dbForwardOnly Then
    chkForwardOnly.Value = vbChecked
  End If

  optBOFAction(gDataCtlObj.BOFAction).Value = True
  optEOFAction(gDataCtlObj.EOFAction).Value = True
  
  optOLECtl.Value = IIf(gDataCtlObj.Tag = "OLE", True, False)
  
  Screen.MousePointer = vbDefault
End Sub


'*********************************************************************************
'**          This Section Of Code Was Automatically Generated By ResMe          **
'**                                                                             **
'** String assignments to Constants have been converted to read-only properties **
'*********************************************************************************


'This was: Const FORMCAPTION = "Data Control Properties"
Property Get FORMCAPTION As String
    'WAS: FORMCAPTION = "Data Control Properties"
    FORMCAPTION = LoadResString(S128_Data_Control_Proper)

End Property

'This was: Const BUTTON1 = "&Refresh Data Control"
Property Get BUTTON1 As String
    'WAS: BUTTON1 = "&Refresh Data Control"
    BUTTON1 = LoadResString(S442_Refresh_Data_Contro)

End Property

'This was: Const BUTTON2 = "&Cancel"
Property Get BUTTON2 As String
    'WAS: BUTTON2 = "&Cancel"
    BUTTON2 = LoadResString(S84_Cancel)

End Property

'This was: Const Label1 = "Database Properties"
Property Get Label1 As String
    'WAS: Label1 = "Database Properties"
    Label1 = LoadResString(S143_Database_Properties)

End Property

'This was: Const Label2 = "Recordset Properties"
Property Get Label2 As String
    'WAS: Label2 = "Recordset Properties"
    Label2 = LoadResString(S438_Recordset_Propertie)

End Property

'This was: Const LABEL3 = "Data Control Properties"
Property Get LABEL3 As String
    'WAS: LABEL3 = "Data Control Properties"
    LABEL3 = LoadResString(S128_Data_Control_Proper)

End Property

'This was: Const LABEL4 = "Bound Binary Control Type:"
Property Get LABEL4 As String
    'WAS: LABEL4 = "Bound Binary Control Type:"
    LABEL4 = LoadResString(S72_Bound_Binary_Contro)

End Property


Private Sub frmDataCtlProp_Auto_Init()
'This routine initializes all User Interface control properties on frmDataCtlProp.
'This section of code was automatically generated by the ResMe String Extraction Utility.
    'WAS: Me.Caption = "Data Control Properties"
    Me.Caption = LoadResString(S128_Data_Control_Proper)

    'WAS: optOLECtl.Caption = "OLE"
    optOLECtl.Caption = LoadResString(S358_OLE)

    'WAS: optPictureCtl.Caption = "PictureBox"
    optPictureCtl.Caption = LoadResString(S411_PictureBox)

    'WAS: chkForwardOnly.Caption = "ForwardOnly"
    chkForwardOnly.Caption = LoadResString(S260_ForwardOnly)

    'WAS: chkFailOnError.Caption = "FailOnError"
    chkFailOnError.Caption = LoadResString(S231_FailOnError)

    'WAS: chkSQLPassthrough.Caption = "SQLPassthru"
    chkSQLPassthrough.Caption = LoadResString(S508_SQLPassthru)

    'WAS: chkConsistent.Caption = "Consistent"
    chkConsistent.Caption = LoadResString(S110_Consistent)

    'WAS: chkInconsistent.Caption = "Inconsistent"
    chkInconsistent.Caption = LoadResString(S295_Inconsistent)

    'WAS: chkAppendOnly.Caption = "AppendOnly"
    chkAppendOnly.Caption = LoadResString(S49_AppendOnly)

    'WAS: chkReadOnly.Caption = "ReadOnly"
    chkReadOnly.Caption = LoadResString(S434_ReadOnly)

    'WAS: chkDenyRead.Caption = "DenyRead"
    chkDenyRead.Caption = LoadResString(S169_DenyRead)

    'WAS: chkDenyWrite.Caption = "DenyWrite"
    chkDenyWrite.Caption = LoadResString(S170_DenyWrite)

    'WAS: chkDBReadOnly.Caption = "ReadOnly"
    chkDBReadOnly.Caption = LoadResString(S434_ReadOnly)

    'WAS: chkExclusive.Caption = "Exclusive"
    chkExclusive.Caption = LoadResString(S219_Exclusive)

    'WAS: cmdCancel.Caption = "&Cancel"
    cmdCancel.Caption = LoadResString(S84_Cancel)

    'WAS: cmdRefresh.Caption = "&Refresh Data Control"
    cmdRefresh.Caption = LoadResString(S442_Refresh_Data_Contro)

    'WAS: optRSType(1).Caption = "1 - Dynaset"
    optRSType(1).Caption = LoadResString(S20_1_Dynaset)

    'WAS: optRSType(0).Caption = "0 - Table"
    optRSType(0).Caption = LoadResString(S17_0_Table)

    'WAS: optRSType(2).Caption = "2 - Snapshot"
    optRSType(2).Caption = LoadResString(S23_2_Snapshot)

    'WAS: optEOFAction(2).Caption = "2 - AddNew"
    optEOFAction(2).Caption = LoadResString(S22_2_AddNew)

    'WAS: optEOFAction(0).Caption = "0 - MoveLast"
    optEOFAction(0).Caption = LoadResString(S16_0_MoveLast)

    'WAS: optEOFAction(1).Caption = "1 - EOF"
    optEOFAction(1).Caption = LoadResString(S21_1_EOF)

    'WAS: optBOFAction(1).Caption = "1 - BOF"
    optBOFAction(1).Caption = LoadResString(S19_1_BOF)

    'WAS: optBOFAction(0).Caption = "0 - MoveFirst"
    optBOFAction(0).Caption = LoadResString(S15_0_MoveFirst)

    'WAS: lblLabels(9).Caption = "Bound Binary Control Type: "
    lblLabels(9).Caption = LoadResString(S73_Bound_Binary_Contro)

    'WAS: lblLabels(8).Caption = "Data Control Properties"
    lblLabels(8).Caption = LoadResString(S128_Data_Control_Proper)

    'WAS: lblLabels(10).Caption = "Recordset Properties"
    lblLabels(10).Caption = LoadResString(S438_Recordset_Propertie)

    'WAS: lblLabels(7).Caption = "Database Properties"
    lblLabels(7).Caption = LoadResString(S143_Database_Properties)

    'WAS: lblLabels(6).Caption = "Options: "
    lblLabels(6).Caption = LoadResString(S389_Options)

    'WAS: lblLabels(5).Caption = "RecordSource: "
    lblLabels(5).Caption = LoadResString(S440_RecordSource)

    'WAS: lblLabels(4).Caption = "Connect: "
    lblLabels(4).Caption = LoadResString(S108_Connect)

    'WAS: lblLabels(3).Caption = "Name: "
    lblLabels(3).Caption = LoadResString(S331_Name)

    'WAS: lblLabels(2).Caption = "RecordsetType: "
    lblLabels(2).Caption = LoadResString(S439_RecordsetType)

    'WAS: lblLabels(1).Caption = "EOFAction: "
    lblLabels(1).Caption = LoadResString(S208_EOFAction)

    'WAS: lblLabels(0).Caption = "BOFAction: "
    lblLabels(0).Caption = LoadResString(S70_BOFAction)

End Sub