ht208.frm
来自「《VB6数据库开发指南》所有的例程的源码」· FRM 代码 · 共 53 行
FRM
53 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 1935
ClientLeft = 4035
ClientTop = 4290
ClientWidth = 5070
LinkTopic = "Form1"
PaletteMode = 1 'UseZOrder
ScaleHeight = 1935
ScaleWidth = 5070
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
On Error GoTo ProcError
Dim db As Database
Dim dbName As String
Dim rs As Recordset
Dim s As String
' Get the database name and open the database.
' BiblioPath is a function in READINI.BAS
5 dbName = BiblioPath()
10 Set db = DBEngine.Workspaces(0).OpenDatabase(dbName)
20 Set rs = db.OpenRecordset("No Such Table", dbOpenTable)
30 Set rs = db.OpenRecordset("Titles", dbOpenTable)
40 s = rs![No Such Field]
50 rs.Edit
60 rs![Year Published] = "XYZ"
70 rs.Update
80 End
Exit Sub
ProcError:
MsgBox "Error: " & Err.Number & vbCrLf & _
"Line: " & Erl & vbCrLf & _
Err.Description, vbExclamation
Resume Next
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?