Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem saving File - No error message returned
Message
From
21/08/2000 11:19:55
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Problem saving File - No error message returned
Miscellaneous
Thread ID:
00407329
Message ID:
00407329
Views:
54
Hi everybody,

I experienced a strange problem last week and I would like to have experienced programmers gives me their feedback or ideas about it.

Thanks in advance.

The program is working fine with a copy of the data wich is 3 weeks old, when I use the same program with a recent copy of the data,
the table "APDTLPRJ" (the third table)is not saved but no error message is return (in other words, tableupdate must have returned true because all other tables were updated including the last one) . To "fix" the data, I had to recreate all the index on the table (reindex was not enough), so I assume there was something corrupt in the .cdx file.

I understand there could be file curruption once and a while BUT why did tableupdate returned .t. and let the user continue without knowing that some data was not saved. Is there a way I can prevent such a problem in the future. All I need is a message telling me there is something wrong going on.

The original data was on a novell netware and I took a copy of it, bring it locally on my personnal PC (windows NT station) and it did the same things, no message but the table was not saved (until I recreate the index ofcourse).

Why did the file got corrupt is not the point here, I don't really know, and it does not really matters, these things can happen sometimes, that's life.



laTableAlias[1] = "APDTL"
laTableAlias[2] = "APJLDTL"
laTableAlias[3] = "APDTLPRJ"
laTableAlias[4] = "APSUPP"
laTableAlias[5] = "POMSTR"
laTableAlias[6] = "PODTL"
laTableAlias[7] = "PODTLINV"
laTableAlias[8] = "JCCATPER"
laTableAlias[9] = "JCCATPRJ"

FOR i = 1 TO 9
llSuccess = FLOCK("&laTableAlias[i]")
IF !llSuccess
EXIT
ENDIF
ENDFOR

IF llSuccess
BEGIN TRANSACTION

** Coding here

FOR i = 1 TO 9
llSuccess = TABLEUPDATE(1,.F.,"&laTableAlias[i]")
IF !llSuccess
ROLLBACK
EXIT
ENDIF
ENDFOR
IF llSuccess
END TRANSACTION
ENDIF
ENDIF
FOR i = 1 TO 9
UNLOCK IN &laTableAlias[i]
ENDFOR

WAIT CLEAR
IF !llSuccess
lcText = oT.M("ERROR_UPDATE_FILE")
lcPB = oT.C("OK")
lcTitle = oT.M("ERROR_UPDATE")
&& (lcText,lcHeading,lcPB,llBell,lcTitle,lnPBInit,lcQEI,lnClose)
= MessBox(lcText,"",lcPB,.T.,lcTitle,1,"I",1)
RETURN .F.
ENDIF
Diane Robitaille eng.
Reply
Map
View

Click here to load this message in the networking platform