Method
Specifies that not finding a table will not cause an error.
Category
Errors
Syntax
Sub AllowTableNotFound
Example
CF1.AllowTableNotFound
tmpVar2 = CF1.OpenTable(hTable, 12345678)
If tmpVar2 = False Then
logWr "AllowTableNotFound: OK"
Else
logWr "AllowTableNotFound: Failed"
End If
CF1.CloseTable hTable
'cleanup
deleteTestTable
terminalCF1
Comments
This function only allows the error to occur for one function call.
It must be set each time you want to use it (as opposed to
disabling the error for your application as a whole).
This function works as if HideError had been set to TRUE before a function that tries to access a table is called, and HideError is reset to FALSE afterwards. This means that it is shorthand for a construction like the following (where Cf is a C/FRONT OCX object):
Cf.HideError = TRUE
Cf.FunctionThatAccessesTable
Cf.HideError = FALSE
Using this function also means that LastError cannot be used to retrieve an error code. You have to use the return value of the function, as follows:
Cf.AllowTableNotFound
Ret = Cf.FunctionThatAccessesTable
If Ret <> TRUE Then
' handle error
AllowTableNotFound affects the OpenTable function.