Table not updating in time? anyone ever seen this?

Results 1 to 2 of 2

Thread: Table not updating in time? anyone ever seen this?

  1. #1
    Join Date
    Dec 1969

    Default Table not updating in time? anyone ever seen this?

    Inside my page, I am deleting all the rows in my table and then inserting data in them through a simple looping. <BR><BR>In the same page, after the looping, I am trying to display the data from the table, everything displays except the last record created. When the page is done I see the data in the table and if I run the code without all the deleting and re-adding, The data displays correctly.<BR><BR>I suspect somehow that MSAccess table has not fully updated when I display my data during the same page as it is populating the table. <BR><BR>Has anyone ever seen something like this? If I split the page where I do all the deleting and re-populating into a response.redirect to another page with the same code to display the data it works fine ---- But I am extremely interested why this is happening.<BR><BR>Here is some of the important code (sorry for dumping it here but I am intrigued at what is happening)<BR><BR><BR><BR>do while not salesrepsqlrs.EOF &#039; do while a sales rep is there<BR> subcount = 0<BR> salesrep = salesrepsqlrs("SALES_REP")<BR> division = salesrepsqlrs("DIVISION_NAME")<BR> ssql = "SELECT [Local Spread].WKEND.....cut) <BR> set sumrs = conn.Execute (ssqlsum)<BR> subtotalnspread = sumrs("SumOfnspread")<BR> salesrepsqlrs.movenext<BR> &#039; here are the division totals<BR> <BR> grandnspread = grandnspread + subtotalnspread<BR> superrecgrandnspread = superrecgrandnspread + subtotalnspread<BR> <BR> rs.Open "corp", conn, adOpenKeySet, adLockOptimistic, adCmdTable<BR> rs.AddNew<BR> rs("inits") = salesrep<BR> rs("amount") = subtotalnspread<BR> rs("title") = "SalesPerson"<BR> rs("division") = divrep<BR> rs("div") = divnum<BR> rs.Update<BR> rs.close <BR> <BR> loop

  2. #2
    Join Date
    Dec 1969

    Default RE: Table not updating in time? anyone ever seen t

    I&#039;ve seen it... sometimes the loop works too fast and some of the records don&#039;t make it in. Maybe an ADO bug... who knows.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts