houssemchak
Messages postés15Date d'inscriptionmardi 3 mars 2009StatutMembreDernière intervention22 septembre 2010
-
24 avril 2010 à 11:26
houssemchak
Messages postés15Date d'inscriptionmardi 3 mars 2009StatutMembreDernière intervention22 septembre 2010
-
24 avril 2010 à 13:29
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Connection.ConnectionString = "provider=microsoft.jet.oledb.4.0;" & _
"data source= C:\Documents and Settings\Administrateur\Bureau" & "\dat.mdb"
'Try
Dim n
Dim d As New Date
Dim cmd As String
n = TextBox1.Text
d = TextBox2.Text
cmd = "INSERT INTO dt VALUES (" & n & ", #" & Format(CDate(DateTimePicker1.Value).Date, "dd/MM/yyyy") & "# )"
Console.WriteLine("dat=" & Format(CDate(DateTimePicker1.Value).Date, "dd/MM/yyyy"))
Dim adapter As New OleDbDataAdapter(cmd, Connection)
Dim tob As New Data.DataSet
Connection.Open()
adapter.Fill(tob)
' Catch ex As Exception
MsgBox("Impossible d'ajouter cette intervention. Vérifiez vos champs")
' End Try
Connection.Close()
End Sub
je tape 04/06/2010
je trouve 06/04/2010 dans ma base