Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1113 on Requery()
Message
From
31/05/2013 15:46:33
 
 
To
29/05/2013 16:58:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01575077
Message ID:
01575357
Views:
79
>I've got a weird situation. Hoping it'll ring a bell for someone. A client has an application based on the Mere Mortals framework. In the midst of doing a large processing piece (not sure how large overall, but the repro up to the error takes 45-60 minutes), it fails with error 1113.
>
>The line that's triggering the error is a Requery() of a local view. Immediately before the Requery(), I've added code that confirms that the view itself is open. (And I just checked: the error that shows up when you try to Requery() a view that's not open isn't 1113.)
>
>This error occurs after processing tens of thousands of records from a cursor. It's reproducible, always failing on the same record. But as I said, it's a cursor, so table corruption seems extremely unlikely. Also, the client says that it reproduces only with the EXE, not in the IDE. I haven't tested this case because I don't know the app well enough.
>
>Anybody ever run into 1113 and have any ideas?
>

So found something, but I don't know what to make of it.

I added code to the app to throw information into a log file. When the error occurs, I'm logging (among other things) LIST STATUS for every data session that's open. This part of the logging code is:
goApp.AddToLogFile("  ---Data in Use---")
LOCAL laSessions[1], lnSessions, lnSession, lnCurSession, lcTempFile, lcStatInfo, lcConfirm
lnSessions = ASESSIONS(laSessions)

lcTempFile = forcepath("StatList.txt",sys(2023))
lcConfirm = set("Confirm")
set confirm off 

lnCurSession = SET("Datasession")
FOR lnSession = 1 TO m.lnSessions
	SET DATASESSION TO laSessions[m.lnSession]
	goApp.AddToLogFile('  Data Session ' + TRANSFORM(laSessions[m.lnSession]))
	
	List Status to (m.lcTempFile)
	lcStatInfo = filetostr(m.lcTempFile)
	goApp.AddToLogFile(m.lcStatInfo)
	erase (m.lcTempFile)
endfor 

set confirm &lcConfirm
set datasession to m.lnCurSession
When I examine the log, I see that the index file for this view (one tag is created when the view is opened) is listed as:

C:\USERS\TGRANOR\APPDATA\LOCAL\TEMP\STATLIST.TXT

To make this more interesting, I'm actually logging all this stuff for the record before the error and just before the error occurs. On the record before the error, the index file has a temp file name, but by the time we're about to requery the view on the record where the error occurs, it shows up as STATLIST.TXT.

So it sure seems that something's happening to the index file. Not sure how or where, but I can enhance my logging to try to answer "where."

Tamar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform