Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question about Tablevalidate Setting
Message
 
 
À
09/02/2006 12:00:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01094960
Message ID:
01100041
Vues:
17
>>Jim,
>>You are correct about the error occuring inside a transaction. In fact, it occured on the line 'End Transaction' which indicates that begin trans and end trans are doing some internal checking of file lengths versus header lengths and that in this checking the status of tablevalidate must be ignored. How would you trap for this error? Would something like this work -
>>
>>try
>> end transaction
>>catch to myerr when myerr.errorNo=2065
>> * is 2065 the only error that could occur on the end transaction line
>> rollback
>> alert the user to the problem
>> try to fix the problem as you outlined in your reply
>>endtry
>>
>>The error message indicates the table that the error occured on. Does adding and then deleting a record fix the problem?
>
>Phew. My memory is still working < s >
>First thing... I have minimal experience with the error myself and the error isn't even documented in the VFP8 Help (which is what I use), so I don't know if it's the only error.
>
>I think I would put the whole BEGIN TRANSACTION / TABLEUPDATE / ROLLBACK and/or END TRANSACTION sequence in the TRY...CATCH and I would be sure to:
>a) check the return of each TABLEUPDATE;
>b) use the cErrorArray parameter on the TABLEUPDATEs.
>
>I'm not at all sure that the SET TABLEVALIDATE TO 0 / USE... / APPEND BLANK / DELETE / USE IN / SET TABLEVALIDATE TO x would work in the CATCH, but it may be worth a try.
>
>I've also remembered something else in relation to this error which is said to help a lot. Two things actually:
>
>UPDATED LATER: these may be enough...
>1) Put SYS(1104) immediately before the BEGIN TRANSACTION
>--- I believe in VFP9 you can even do it for specific tables
>2) Add 2 dummy fields at the very beginning (first 2 fields) of the tables
>--- DUMMY1 I
>--- DUMMY 2 C(10)
>
>Maybe others will chime in with more/better ideas. Perhaps you want a new thread to try to get that.

Jim & Calvin,

We seem to be having the same problem in production. Here is the error we're getting which is happenning randomly (not reproducible so far in development environment, but more and more frequently in production) on END TRANSACTION line:

2065
Table "C:\DOCUME~1\swill001\LOCALS~1\Temp\00003IMX00J7.TMP" has a file length / record count inconsistency. The table will need to be repaired before transactions can be committed properly.
C:\DOCUME~1\swill001\LOCALS~1\Temp\00003IMX00J7.TMP

My question is: have you been able to resolve the problem? If yes, what was your solution? We're using TABLEVALIDATE 7 in our system.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform