I created a database in MSAccess and created a connection module. However, when the execute gives connection error. Does anyone have another example of how to connect VB6 to MSAcess?
My module code:
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