⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 breakreplica.frm

📁 《VB6数据库开发指南》所有的例程的源码
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Begin VB.Form frmBreakReplica 
   Caption         =   "Break Replica Set"
   ClientHeight    =   1725
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6870
   LinkTopic       =   "Form1"
   ScaleHeight     =   1725
   ScaleWidth      =   6870
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton cmdBreakReplica 
      Caption         =   "&Break Replica"
      Height          =   495
      Left            =   0
      TabIndex        =   3
      Top             =   960
      Width           =   1935
   End
   Begin VB.CommandButton cmdOpenFrom 
      Caption         =   "&Browse"
      Height          =   375
      Left            =   5640
      TabIndex        =   2
      Top             =   480
      Width           =   1095
   End
   Begin MSComDlg.CommonDialog cdOpenFile 
      Left            =   6120
      Top             =   0
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   327680
      Filter          =   "Access Files (*.mdb)|*.mdb"
   End
   Begin VB.TextBox txtDbNameFrom 
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   480
      Width           =   5415
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Database to remove from set:"
      Height          =   195
      Left            =   0
      TabIndex        =   1
      Top             =   240
      Width           =   2085
   End
End
Attribute VB_Name = "frmBreakReplica"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub cmdBreakReplica_Click()
Dim dbReplica As Database

    On Error GoTo DbError
    
    ' Open the database in exclusive mode
    Set dbReplica = Workspaces(0).OpenDatabase(txtDbNameFrom.Text, True)
    
    dbReplica.DesignMasterID = dbReplica.ReplicaID
    
    dbReplica.Close
    
    Exit Sub
    
DbError:
    MsgBox Err.Description & " From: " & Err.Source _
            & "Number: " & Err.Number
    Exit Sub
    
End Sub

Private Sub cmdOpenFrom_Click()
' Open the Replicate from database file
    cdOpenFile.InitDir = App.Path
    cdOpenFile.ShowOpen
    txtDbNameFrom.Text = cdOpenFile.filename
        
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -