Hello,
I am using VB.NET 2008 and I can't create a button. I recieve the message shown in the title !
Here is my code :
dtr = dts.Tables("28071").NewRow
'dtr("datee") = TextBox1.Text
'dtr("index") = TextBox2.Text
'dtr("hmj") = TextBox3.Text
'dtr("hmc") = TextBox4.Text
'dtr("CumulJours") = calcul.TextBox5.Text
'dts.Tables("28071").Rows.Add(dtr)
'cmbd = New OleDbCommandBuilder(dta)
'dta.Update(dts, "28071")
'dts.Clear()
'dta.Fill(dts, "28071")
'dtt = dts.Tables("28071")
'cnx.Close()
or I use this code
cnx = New OleDbConnection("provider = microsoft.jet.oledb.4.0; data source= D:\Nouveau dossier (2)\hm.mdb")
cnx.Open()
cmd.CommandText = "insert into 28071 (datee,index,hmj,hmc,CumulJours) values('" & TextBox1.Text & "'," & TextBox2.Text & "'," & TextBox3.Text & "'," & TextBox4.Text & "'," & TextBox5.Text & "')"
cmd.Connection = cnx
cmd.ExecuteNonQuery()
cnx.Close()
Same problem !
I am using VB.NET 2008 and I can't create a button. I recieve the message shown in the title !
Here is my code :
dtr = dts.Tables("28071").NewRow
'dtr("datee") = TextBox1.Text
'dtr("index") = TextBox2.Text
'dtr("hmj") = TextBox3.Text
'dtr("hmc") = TextBox4.Text
'dtr("CumulJours") = calcul.TextBox5.Text
'dts.Tables("28071").Rows.Add(dtr)
'cmbd = New OleDbCommandBuilder(dta)
'dta.Update(dts, "28071")
'dts.Clear()
'dta.Fill(dts, "28071")
'dtt = dts.Tables("28071")
'cnx.Close()
or I use this code
cnx = New OleDbConnection("provider = microsoft.jet.oledb.4.0; data source= D:\Nouveau dossier (2)\hm.mdb")
cnx.Open()
cmd.CommandText = "insert into 28071 (datee,index,hmj,hmc,CumulJours) values('" & TextBox1.Text & "'," & TextBox2.Text & "'," & TextBox3.Text & "'," & TextBox4.Text & "'," & TextBox5.Text & "')"
cmd.Connection = cnx
cmd.ExecuteNonQuery()
cnx.Close()
Same problem !