Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 108 upon insert
Message
 
 
À
09/03/2009 16:16:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01386723
Message ID:
01386795
Vues:
50
Retrying N times will reduce probability of the error but cannot eliminate it. You shouldn't leave the error unprocessed or you may miss some audit records w/o even knowing it.
Also you should check for the error code in the CATCH and act on 108 only otherwise you may hide other errors.

It's easy to put this table in SQL Server if you have SQL Server and know how to work with it. :)
The SQL Server wouldn't have problem with concurrent inserting the records.

>Thanks for the suggestions. Something like this would try a max of 5 times with a short random delay between tries. I'm still not doing anything about it if it eventually fails, but I assume this would cut that probability down considerably.
>
>I'm not using a back end database right now. I wonder how hard it might be to put just this audit table into SQL Server. Could that problem be avoided by doing that?
>
>
>
>Declare Sleep IN Win32API;
>INTEGER dwMilliseconds
>Local i, loError
>loError = .F.
>For i = 1 To 5
>	Try
>		Insert Into Auditlog_sys ; && etc 
>			
	CATCH TO oExp WHEN oExp.ErrorNo = 108
>		loError = .T.
>		Sleep(Rand()*50+10)
>	Endtry
>	If !loError
>		Exit
>	Endif
>Endfor
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform