Jump to content
Tom Wellige

4.7 - Properties - LatestError

Recommended Posts

This property returns a Windows Error Code (numerical) of the last read/write access of the persistent variable. The Windows Error Text can be found in LatestDescription.

 

A list of all possible error codes and their meaning can be found in the MSDN (Microsoft Developer Network):

This property is read only.

 

As persistent variables are stored into a database there is a possibility of runtime errors. To check for any such runtime errors during read or write access of a peristent variable you can check this property for not equal zero.

 

If you have installed the Persistent Variable extension as recommended the chances for runtime errors are very low. Therefore it shouldn't be necessary to add error handling.

 

If you have installed the extension lets say into a database server on another machine it is highly recommended to add proper error handling.

Dim Welcome
Set Welcome   = new PersistentVariable
Welcome.Name  = "Welcome"
Welcome.Value = "Welcome Default.wav"
 
if Welcome.LatestError <> 0 then
    ' add your error handling here
    ' error code in LatestError
    ' error descr in LatestDescription
end if

 

The above example gives a template for own error handling.
 

 

Index

<< Previous 4.6 - Properties - UserID

>> Next 4.8 - Properties - LatestDescription


 

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.