[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

clearing data from data adaptor


the objDS.Tables(0).Rows.Count  seems to be accumulating itself instead of giving the count of just the current select.  It gives me the count of all previous selects plus the current one.   How do I clear the loaded data at the end of each while loop?

Here is a simplified view of the code that is running

while something

            strSQL = "SELECT * from sometable where whatever"
            objDA = New SqlClient.SqlDataAdapter(strSQL, conn)

            objDA.Fill(objDS)
            For intcounter = 0 To objDS.Tables(0).Rows.Count - 1
                      ................
            next
endwhile
0
unreal400
Asked:
unreal400
  • 2
1 Solution
 
RonaldBiemansCommented:
objDS.clear
0
 
RonaldBiemansCommented:
objDS.tables(0).clear
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now