1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Dim tonConnecteurBDD As OleDb.OleDbConnection = New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=followflash.accdb;")
tonConnecteurBDD.Open()
Dim taCommandeSQL As String = "Insert INTO Table1 (NOM,PRENOM,MAIL,TEL,CONSOLE,MODELE,SERIAL,LECTEUR,INTERVENTION,TARIF,DATE_INTER,PAYE) VALUES('var','var1','var','var','var','var','var','var','var','50','10/01/1998','var')"
Dim maCommande As OleDb.OleDbCommand = New OleDb.OleDbCommand(taCommandeSQL, tonConnecteurBDD)
'Try
maCommande.Connection = tonConnecteurBDD
maCommande.CommandText = taCommandeSQL
maCommande.ExecuteNonQuery()
' Catch ex As Exception
'MessageBox.Show(ex.ToString, "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error)
' End Try
tonConnecteurBDD.Close()
MsgBox("C'est ajouté !") |
Partager