Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dataadapter running slow on fill

Status
Not open for further replies.

michelleHEC

Programmer
Oct 20, 2003
95
US
I really need help. I cannot figure out why my code is hanging on the fill. It never used to. Here is my code.
any help will be extremely appreciated.
Me.daNet.Fill(Me.DsNet) 'here is where it is hanging

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)

pdsIR = Me.DsNet.GetChanges(DataRowState.Added)

If Not pdsIR Is Nothing Then
Me.daNet.Update(pdsIR)

End If

Me.DsNet.AcceptChanges()
DsNet.Clear()
pdsIR.Clear()
 
I figured it out. I used the top operator in my sql statement and set it to top 1. now it is running much faster.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top