KelMan:
Δεν γίνεται... Το ότι ανοίγει το flat file με τον provider για jet engine δεν σημαίνει ότι είνα και update-able.
Αυτό σκεφτόμουνα και εγώ αλλά με προβήματίζει ότι έκανα Insert Into στο txt file.... Δηλαδή μπορώ να κάνω Insert νέας εγγραφής αλλά όχι Delete...;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
Private Sub Append_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Append.Click Using connection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Hlc\;Extended Properties='TEXT;HDR=Yes;FMT=TabDelimited';") Using command As New OleDbCommand("Insert Into [" & "nonet.txt" & "](ID,zygos,vardia,mach,po,order_,line,customer,product,mixed,tare,net,pcs,no_,eddy) VALUES (@ID,@zygos,@vard,@Mach,@po,@order,@line,@customer,@product,@mixed,@tare,@net,@pcs,@no,@eddy)", connection)
command.Parameters.AddWithValue("@ID", Me.ZygID.Text + "_" + Format(Now(), "yyyyMMddhhmmss")) command.Parameters.AddWithValue("@Zygos", Me.ZygID.Text) command.Parameters.AddWithValue("@Vard", Me.vard.Text) command.Parameters.AddWithValue("@Mach", Me.mhx.Text) command.Parameters.AddWithValue("@po", Me.po.Text) command.Parameters.AddWithValue("@order", Me.Ord.Text) command.Parameters.AddWithValue("@line", Me.line.Text) command.Parameters.AddWithValue("@customer", Me.customer.Text) command.Parameters.AddWithValue("@product", Me.product.Text) command.Parameters.AddWithValue("@mixed", Me.mixed.Text) command.Parameters.AddWithValue("@tare", Me.tare.Text) command.Parameters.AddWithValue("@net", Me.net.Text) command.Parameters.AddWithValue("@pcs", Me.pcs.Text) command.Parameters.AddWithValue("@no", Me.no.Text) command.Parameters.AddWithValue("@eddy", Me.eddy.Text)
connection.Open() command.ExecuteNonQuery()
LoadData("nonet.txt") End Using End Using End Sub |
Dionisis