A
a.marmugi
I'have a problem. Ado net 2.0 is resulting very slowly. I'vemade a
test in which i write 100000 record in a database with VB6 Dao and
with VB2005 ADO net 2.0. In the first case the time elapsed for the
operation is 2 second, in the second case the time elapsed is 2
minutes. Can anyone help me to find where i wrong (if i wrong
something...).
in particulary the most part of the time is used for complete the
Update method.
The vb2005 code tha i've use for the test is this:
----------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.Label1.Text = Now
Dim ds As New dbprovaDataSet
Dim tab As dbprovaDataSet.tabella1DataTable = ds.tabella1
Dim riga As dbprovaDataSet.tabella1Row
Dim i As Integer = 0
For i = 1 To 100000
riga = tab.Newtabella1Row
riga.campo = i
tab.Addtabella1Row(riga)
Next
Me.Label2.Text = Now
adap.Update(tab)
Me.Label3.Text = Now
MsgBox("fine")
End Sub
test in which i write 100000 record in a database with VB6 Dao and
with VB2005 ADO net 2.0. In the first case the time elapsed for the
operation is 2 second, in the second case the time elapsed is 2
minutes. Can anyone help me to find where i wrong (if i wrong
something...).
in particulary the most part of the time is used for complete the
Update method.
The vb2005 code tha i've use for the test is this:
----------------------------
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.Label1.Text = Now
Dim ds As New dbprovaDataSet
Dim tab As dbprovaDataSet.tabella1DataTable = ds.tabella1
Dim riga As dbprovaDataSet.tabella1Row
Dim i As Integer = 0
For i = 1 To 100000
riga = tab.Newtabella1Row
riga.campo = i
tab.Addtabella1Row(riga)
Next
Me.Label2.Text = Now
adap.Update(tab)
Me.Label3.Text = Now
MsgBox("fine")
End Sub