opendatabase.bas
来自「多种图表的绘制及其运用」· BAS 代码 · 共 31 行
BAS
31 行
Attribute VB_Name = "OpenDatabase"
'*************************************************
'* Project: Geek Companion *
'* Programmer: Gnu Kemist GnuKemist@yahoo.com *
'* Version: 0.0.1 (as of March. 20, 2001) *
'* Known Bugs: None *
'*************************************************
Global cnnBiochemistry As New ADODB.Connection
Global cmdGrid As New ADODB.Command
Global rstGrid As New ADODB.Recordset
Global cmdChart As New ADODB.Command
Global rstChart As New ADODB.Recordset
Global cmdPoints As New ADODB.Command
Global rstPoints As New ADODB.Recordset
Public Sub Constructor()
'# Opes a connection to the Biochemistry Database #
'# The DataSource section MUST match the path to the database on #
'# your own computer (i.e. Data Source= [Correct Path] & "\Biochemistry.MDB #
'C:\WINNT\Profiles\omaciel\My Documents
cnnBiochemistry.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& " Data Source=" & App.Path & "\Biochemistry.MDB;Persist Security Info=False"
cnnBiochemistry.Open
End Sub
Public Sub Destructor()
'# Closes the object when done #
cnnBiochemistry.Close
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?