michelleHEC
Programmer
I am using the dataadapter and dataset to insert rows into my sql table but it is extremely slow on the da.fill and the da.update what am i doing wrong. here is the code
Me.daNet.Fill(Me.DsNet)
Dim t As DataTable
t = Me.DsNet.Tables("Nettrack")
Dim myrow As DataRow
myrow = t.NewRow()
myrow("ReqDate") = strReqDate
myrow("ReqTime") = strReqTime
myrow("IP") = strIP
myrow("URL") = strURL
t.Rows.Add(myrow)
Dim pdsIR As DataSet
pdsIR = Me.DsNet.GetChanges(DataRowState.Added)
If Not pdsIR Is Nothing Then
Me.daNet.Update(pdsIR)
End If
Me.DsNet.AcceptChanges()
Me.daNet.Fill(Me.DsNet)
Dim t As DataTable
t = Me.DsNet.Tables("Nettrack")
Dim myrow As DataRow
myrow = t.NewRow()
myrow("ReqDate") = strReqDate
myrow("ReqTime") = strReqTime
myrow("IP") = strIP
myrow("URL") = strURL
t.Rows.Add(myrow)
Dim pdsIR As DataSet
pdsIR = Me.DsNet.GetChanges(DataRowState.Added)
If Not pdsIR Is Nothing Then
Me.daNet.Update(pdsIR)
End If
Me.DsNet.AcceptChanges()