A voir également:
- CODE SOURCE VB6
- Le code ascii - Guide
- Code puk bloqué - Guide
- Code telephone oublié - Guide
- Code activation windows 10 - Guide
- Code gta 4 ps4 - Guide
1 réponse
' dans un module standard ...
Public CN As New Connection
Sub INITiAL()
Dim cheminDbabs As String
If CN.State = adStateOpen Then CN.Close
'"""""""" app.path --->retourne le chemin de votre projet
cheminDbabs = App.Path & "\nom_base.mdb"
'"""""""tester l'existance de la base""""""""""""""""""""
If Dir(cheminDbabs) = "" Then
MsgBox " Base Inexistante !!!", vbInformation
Exit Sub
End If
'"""""""""chemin de connection standart pour toute connection access""""""""""
CN.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & cheminDbabs & ";" & _
"Jet OLEDB:Database Password="
End Sub
Public CN As New Connection
Sub INITiAL()
Dim cheminDbabs As String
If CN.State = adStateOpen Then CN.Close
'"""""""" app.path --->retourne le chemin de votre projet
cheminDbabs = App.Path & "\nom_base.mdb"
'"""""""tester l'existance de la base""""""""""""""""""""
If Dir(cheminDbabs) = "" Then
MsgBox " Base Inexistante !!!", vbInformation
Exit Sub
End If
'"""""""""chemin de connection standart pour toute connection access""""""""""
CN.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & cheminDbabs & ";" & _
"Jet OLEDB:Database Password="
End Sub