Table of contents
TOC
折叠目录
展开目录

CurrentProject.BaseConnectionString 属性 (访问)CurrentProject.BaseConnectionString Property (Access)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

可以使用BaseConnectionString属性可返回指定对象的基础连接字符串。只读的字符串You can use the BaseConnectionString property to return the base connection string for the specified object. Read-only String.

语法Syntax

表达式BaseConnectionStringexpression. BaseConnectionString

表达式_表示当前项目中的一个对象变量。_expression A variable that represents a CurrentProject object.

注解Remarks

BaseConnectionString属性返回的连接字符串通过OpenConnection方法,或通过单击文件菜单上的连接设置。当进行连接时,Microsoft Access 项目中修改与 ADO 环境使用的BaseConnectionString属性。The BaseConnectionString property returns the connection string that was set through the OpenConnection method or by clicking Connection on the File menu. When making a connection, Microsoft Access project modifies the BaseConnectionString property for use with the ADO environment.

示例Example

下面的示例显示当前项目的BaseConnectionString属性设置:The following example displays the BaseConnectionString property setting of the current project:

Public Sub ShowConnectString() 

 Dim objCurrent As Object 

 Set objCurrent = Application.CurrentProject 
 MsgBox "The current base connection is " &; objCurrent.BaseConnectionString 

End Sub

另请参阅See also

概念Concepts

当前项目对象CurrentProject Object

© 2018 Microsoft