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

HELP: Fatal Exception C0000005 when evaluating MEMO field

Status
Not open for further replies.

VBFOXDEV35

Programmer
Mar 26, 2001
77
US
All,
This problem is happening quite often with version 7 and 8 of VFP and I cannot figure out how to resolve this.

In certain cases when I try evaluate the memo field of a clipper dbf file (DBF, DBT,) I receive a fatal error exception in VFP 7 and 8. The only way to get around this is to do the following:

1. use myTable
2. copy to c:\trash\MyTableCopy
3. use MyTable exclusive
4. zap
5. append from c:\trash\MyTableCopy
6. reindex

The code that is generating the error is as follows:
PROCEDURE UP_COMMENT
*Comments
TRY
LOCAL XS, V1COMMENT, strTemp
XS = ALIAS()
SELECT FDNM && Field reference lookup table
SEEK "COMMENT"
IF FOUND() THEN
**>>Line of code with Error
V1COMMENT = EVALUATE(FDRF) && returns myTable.Comment
**<<Line of code with Error
SELECT(XS)
strTemp = getcmt(V1COMMENT, .F. , .T.)
ELSE
SELECT(XS)
strTemp = ""
ENDIF
IF EMPTY(strTemp) THEN
strTemp = "N/A"
ENDIF
CATCH TO strError
MESSAGEBOX(strError)
ENDTRY
RETURN strTemp

The TRY..CATCH does not even catch this error.
Could there be a SET command that I am missing? I believe my application is using MACHINE as the COLLATE default set. Should it be different?

Does anyone have any ideas ?

Thanks

Art



Art DeGaetano II
Software Developer, MOUS
 
Art,
What's in the field FDRF that you need to EVAL()?

Since C0...05s are OS level errors, VFP can't catch them - the OS has already "killed" VFP by the time VFP could know there's a problem. (A real Catch22!)

Rick
 
I agree with Rick, unless FDRF is a dynamically assigned variable representing a field name, just use V1COMMENT = FDRF or V1COMMENT = ALLTRIM(FDRF)

Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top