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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Peculiar Saving problem 1

Status
Not open for further replies.

pramod2179

Technical User
Jun 25, 2001
13
IN
Hi

I am using VB6 access 2k combination with ADO. When I save some data this is what happens.

I fetch it immediately it does not get displayed. But if I give 0.5 sec sleep before saving it is immediately available. Naturally I do not want to give sleep. Pl advice.

Thanks in advance.

Pramod
 
Are you talking about immediately searching for a record that was just added, and it doesn't find it, even though you know it's there? I had the same problem, and I think mine is attributed to network lag of some sort. My solution was to create a public sub inside the form who'se argument(s) are the search criteria and field name. If your code looks for the new record and can't find it, and you're sure it's there, call that sub from within the sub (recursion). Of course, you'll want to static a local variable to keep track of the number of times the sub is called during one search ("fetch") operation. In my case, I've never seen it call itsself more than once, but it's possible you'll hang if the transaction didn't go through correctly.

Good luck!

-Mike
 
I think I heard about this at someone who saved it's data from a Java Servlet into a .mdb through a jdbcodbc driver.

I think he solved the problem with two updates one after another.

Try,
Hope this helps,
s-)

Blessed is he who in the name of justice and good will, shepards the week through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top