0
I created a Msaccess Database and created a connection module. However, when the executable gives connection error. Someone has another example of how to connect VB6 to Msacess?
The code to my module:
Option Compare Database
Option Explicit
Public T As Connection
Public c As Recordset
Private Sub conexao()
Set T = creatobject("adodb.connection")
Set c = creatobject("adodb.recordset")
T.OpenRecordset " provider = microsoft.jet.oledb.4.0;datasource = " + app.Path & "\alex.mdb"
End Sub
Private Sub desconexao()
Set T = Nothing
Set c = Nothing
End Sub
Hello. Try to print
datasource = " + app.Path & "\alex.mdb"
in aMsgBox
and check the path is correct. The database has password?– Omni
has already done but continues to give error, the database has no password.
– user7752