Skip to main content

Check if a field is already there

Hi everyone,
 
is there any way to check whether a field is already contained in a database?
I want to check if a field is there and if not it appends the field. I tried table.getField, but this results in an error.
 
Here is the part of my code I mean:
Dim table As table
Dim field As field Set db = Client.OpenDatabase (dbname)
Set task = db.TableManagement
Set table = db.TableDef
 
Set field = table.getField("DUMMY_NAME") - This will result in an error if the field is not there
...
 
Thanks,
Steve