joyeux_lutin
Messages postés2Date d'inscriptionlundi 26 avril 2004StatutMembreDernière intervention27 avril 2004
-
26 avril 2004 à 10:52
joyeux_lutin
Messages postés2Date d'inscriptionlundi 26 avril 2004StatutMembreDernière intervention27 avril 2004
-
27 avril 2004 à 10:50
Bonjour et merci d'avance du temps que vous allez passer à m'aider: Je suis novice en VB, je réalise la requête suivante (la même syntaxe fonctionne parfaitement dans d'autres exemples avec un SELECT ...) où est l'erreure?
//Déclarations globales//
Dim cn2 As ADODB.Connection
Private WithEvents rsEMP As ADODB.Recordset
//Fonction "on command click..."//
Dim strConnex As String
strConnex = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Projet\competences.mdb;Mode=ReadWrite|Share Deny None;Persist Security Info=False"
Dim SQL2 As String
Set cn2 = New ADODB.Connection
Set rsEMP = New ADODB.Recordset
SQL2 = "INSERT INTO EMPLOYES (NOM,ID_FONCTION,INITIALES) VALUES (" & Text1.Text & "," & rsFonctions.Fields(1) & "," & Text2.Text & ")"
cn2.Open strConnex
rsEMP.CursorLocation = adUseClient
rsEMP.Open SQL2, cn2, adOpenStatic <--- Le pB est là!!!