Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Data update not show

Posted on 2004-10-25
Medium Priority
Last Modified: 2010-05-18
I have some code to insert some values into a temp table, then open a new form with a CR viewer... It seems that the data doesn't "make it" to the table be the time the report opens / datatable is populated... (CR datasource is the datatable)

If i add a msgbox("a") to pause it, it works great... however this is NOT a solution...

Any ideas???

Im off to bed so ill be back in a few hours.

Question by:flavo
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

ID: 12401032
Hi,  flavo!

i think it's impossible to have this kind of problem in the same thread. you say that :
1)first  insert some values into a temp datatable
2)and then open a new form with a CR viewer

be sure that, in the same thread, step 2) will be made only after step 1) is done.
on the other hand, if you do step 2) in another thread... start the thread only after you're sure step 1) is finished..

hope this helps...
if it doesn't, paste your code to see what is the problem..

LVL 34

Author Comment

ID: 12404948
That's what i thought...

I dont have it on me now but basically,


Delete * from myTable
Insert some values into myTable
open other form


Get data from myTable and put it into a dt
Set the dt to the datasoruce for the CR

No threads, just 2 different forms.. Im using Access as a BackEnd...

I was thinking about this last night, and i tihink i just may just go away with the temp table and just pass the datatable, but still coudn't understand why this was happening.......


Accepted Solution

hagipmc earned 1000 total points
ID: 12408341

 I see, Dave...

This is happening because Access is VERY SLOW....so it doesn't have time to do the insert.. before you are asking him the dates from the database... it doesn't depend on you... you send him the sql and how time it takes to Access to execute the sql you will never know... depends on many things..

In this case, I see only 2 solutions:

1)you can assume that it takes 5 seconds(you can estimate this time on your PC) to do 1000 inserts on a pentium 4 at 2400 Mhz... so create a thread to open your new form... tell him to sleep for 5 sec... and then do whatever you want... this is a solution when you know the maximum number of inserts and the system your application will run...

2)do the inserts row by row in a loop... after you insert the last row then open your new form

I don't know who takes more time :)
LVL 34

Author Comment

ID: 12415942
>> Access is VERY SLOW

Yeah.. i found it in another form when adding a record, then refeshing a datagrid down the bottom (adding 1 record, maybe 10 records in table) and still didint update, but that was a logical place to add a msgbox "Data Saved"

I have got around it by creating a datatable in my first form, and passing that to the form with the CR viewer.  Saves my using the temp table.. seems to work so far...

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question