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!

TABLEUPDATE command hangs

Status
Not open for further replies.

skuhlman

Programmer
Jun 10, 2002
260
US
useing VFP7 frontend with a SQL backend

I am using a view to make modifications to some data. My TABLEUPDATE command hangs when it tries to run. If I put a SET STEP ON command immediately before the TABLEUPDATE statement, the debugger pops up and I can either RESUME or STEP INTO the code and the TABLEUPDATE statement fires correctly. Any suggestions?

Code:
.
.
WAIT WINDOW NOWAIT "BEFORE TABLE UPDATE"
**** SET STEP ON     && sometimes I enable this code by uncommenting it
TABLEUPDATE(1,.t.,"vMyView")
WAIT WINDOW NOWAIT "AFTER TABLE UPDATE"
.
.
 
Taking "very long" should not make the program "hang". I've run the same data through with and without the set step. With the "set step" it takes less than 1/2 a second to post the change to the back end. Without the "set step" the program will sit there "forever". We've let it hang for as long as 30 minutes without killing it, expecting that it could just be taking a long time.

We've also had the m.result = TableUpdate... in there. When it hangs, it isn't even populating the m.result, because the command is not finishing.
 
Skuhlman,

Sounds like you need to eliminate some variables.

Does this happen will all your remote views, or one in particular? If the latter, is there anything unusual about it? Is it particularly large.

Have you tried restricting the number of updateble fields? Or trying different options for "SQL WHERE"?

Can you perform the same update directly on the back-end? Or via SQL pass-through.

You understand that I'm not asking you to answer these questions here. I'm just giving examples of things you can eliminate to try to zero in on the answer.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike,
Thanks for the suggestions, but I've pretty much ruled out all of those things. The view has 37 fields (33 updatable) and 270 rows. The WHERE statement is correctly pulling the correct set of records into the view. I've checked and double and triple checked the field definitions.

The one thing I totally do not understand is how the TABLEUPDATE statement works if I step through it, but hangs if I don't. I've even gone as far as putting a pause/stall in the program immediately before the TABLEUPDATE just in case it was a speed issue, but no luck :(

Any additional thought would still be appreciated.

Stacey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top