Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 108 upon insert
Message
 
 
To
09/03/2009 16:16:09
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01386723
Message ID:
01386795
Views:
51
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform