Public adoRs As New ADODB. You 'define a set of data objects
Public adoRs1 As New ADODB. You 'define a set of data objects
Public bQx (1 To 24) As Boolean 'permissions
Public Name1 As String
Public StrNums As Integer
Public Temps' definition of a variant types of Public variables
'declare an API function, used to achieve make the form before buy or cancel the function of the form before buy
Public Declare Function SetWindowPos Lib "user32" (ByVal HWND As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public RTN
Public CnnStr As String
Defining a common Public Sub Main () 'Main function, used to connect to the database
CnnStr="Provider=SQLOLEDB. 1; Persist Security Info=False; User ID=sa; Initial Catalog=db_SPJXC; The Data Source=. "
AdoCon. Open (CnnStr)
End Sub
CodePudding user response:
User ID=sa; The PWD=sa password;CodePudding user response:
The connection string without password.The simplest way is to add ADODC controls, and then use the control link function test, and then control can automatically generate the connection string.
Connect the generated string copy to come over. Convenient and will not go wrong.