Public strclid As String
As the New Public CNN ADODb. Connection
Public user As String
Sub main ()
CNN. Open "driver=Microsoft access driver (*. MDB); DBQ="& amp; App. The Path & amp; "\.. \ database \ enactus MDB
"The login. The Show
End Sub
Statements, always showing CNN=""
RSS. Open the "select * from the user where name='" & amp; Text1. Text & amp; "'", CNN, adOpenDynamic adLockOptimistic
Don't know where is wrong...
CodePudding user response:
'code is not complete, the estimate is no database connection calls CNNSub main (CNN)
CNN. Open "driver=Microsoft access driver (*. MDB); DBQ="& amp; App. The Path & amp; "\.. \ database \ enactus MDB
"End Sub 'this process must be in the module or in the current interface, otherwise the database connection will be lost,
'in the call of the database connection interface, there must be
Dim RSS As New ADODB. You 'statement
Call the main database connection (CNN) 'Call
RSS. Open the "select * from the user where name='" & amp; Text1. Text & amp; "'", CNN, adOpenDynamic adLockOptimistic
'so as not to make a mistake,