Re: How can I speed this up?
i should try to add datarows in stead of the insert command.
Try to fill a dataset Like in this example 'DS' in combination with a .
Someting like:
VB Code:
dbConnection = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0; Data Source=Z:\xxx\DataBases\xxx.mdb")
dbDataAdapter = New OleDBDataAdapter("SELECT * FROM [xxx Table], dbConnection)
ds = New DataSet
dbCommandBuilder = New OleDBCommandBuilder(dbDataAdapter)
dbDataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
dbDataAdapter.Fill(ds, [xxx Table])
ds.clear
(in the Loop: )
Dim Drow as Datarow
Drow = Ds.Tables(0).NewRow()
Drow!anything = blablabla
Drow!AlsoAnyThing = blabla
Ds.Tables(0).Rows.Add(Drow)
(After the loop: )
dbDataAdapter.Update(Ds, [xxx Table])
This will speed thinks up, I think.
Re: How can I speed this up?
Remember that when debugging, any kind of output will affect the speed of processing. The Debug.Writeline is slowing the process down just because it is having to output that to the debug window each iteration. If you run the EXE outside visual studio.net, it will be faster because it shouldnt output the debug messages...