在VB6中设置属性?

时间:2015-04-30 13:40:31

标签: properties vb6 connection-string ado

如何设置此属性的连接字符串值?

Dim mdbDataStoreADOConnection As ADODB.Connection

Public Property Set DataStoreConnection(ByVal dbNewDataStoreConnection As ADODB.Connection) 
 Set mdbDataStoreADOConnection = dbNewDataStoreConnection 
End Property

我希望能够设置此连接变量的连接字符串,例如:

mdbDataStoreADOConnection.ConnectionString = "Provider=MSDASQL;Driver={MySQL ODBC 5.2 ANSI Driver};Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;"

我还在学习VB6,我不确定如何为这个属性赋值?

0 个答案:

没有答案