ORIGINAL 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
    FORMCAPTION = "Data Control Properties"
End Property

'This was: Const BUTTON1 = "&Refresh Data Control"
Property Get BUTTON1 As String
    BUTTON1 = "&Refresh Data Control"
End Property

'This was: Const BUTTON2 = "&Cancel"
Property Get BUTTON2 As String
    BUTTON2 = "&Cancel"
End Property

'This was: Const Label1 = "Database Properties"
Property Get Label1 As String
    Label1 = "Database Properties"
End Property

'This was: Const Label2 = "Recordset Properties"
Property Get Label2 As String
    Label2 = "Recordset Properties"
End Property

'This was: Const LABEL3 = "Data Control Properties"
Property Get LABEL3 As String
    LABEL3 = "Data Control Properties"
End Property

'This was: Const LABEL4 = "Bound Binary Control Type:"
Property Get LABEL4 As String
    LABEL4 = "Bound Binary Control Type:"
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.
    Me.Caption = "Data Control Properties"
    optOLECtl.Caption = "OLE"
    optPictureCtl.Caption = "PictureBox"
    chkForwardOnly.Caption = "ForwardOnly"
    chkFailOnError.Caption = "FailOnError"
    chkSQLPassthrough.Caption = "SQLPassthru"
    chkConsistent.Caption = "Consistent"
    chkInconsistent.Caption = "Inconsistent"
    chkAppendOnly.Caption = "AppendOnly"
    chkReadOnly.Caption = "ReadOnly"
    chkDenyRead.Caption = "DenyRead"
    chkDenyWrite.Caption = "DenyWrite"
    chkDBReadOnly.Caption = "ReadOnly"
    chkExclusive.Caption = "Exclusive"
    cmdCancel.Caption = "&Cancel"
    cmdRefresh.Caption = "&Refresh Data Control"
    optRSType(1).Caption = "1 - Dynaset"
    optRSType(0).Caption = "0 - Table"
    optRSType(2).Caption = "2 - Snapshot"
    optEOFAction(2).Caption = "2 - AddNew"
    optEOFAction(0).Caption = "0 - MoveLast"
    optEOFAction(1).Caption = "1 - EOF"
    optBOFAction(1).Caption = "1 - BOF"
    optBOFAction(0).Caption = "0 - MoveFirst"
    lblLabels(9).Caption = "Bound Binary Control Type: "
    lblLabels(8).Caption = "Data Control Properties"
    lblLabels(10).Caption = "Recordset Properties"
    lblLabels(7).Caption = "Database Properties"
    lblLabels(6).Caption = "Options: "
    lblLabels(5).Caption = "RecordSource: "
    lblLabels(4).Caption = "Connect: "
    lblLabels(3).Caption = "Name: "
    lblLabels(2).Caption = "RecordsetType: "
    lblLabels(1).Caption = "EOFAction: "
    lblLabels(0).Caption = "BOFAction: "
End Sub