Test for property = NIL

How to test for a property = NIL? I have a global App property “DB” as SQlitedatabase. DB is empty when program starts and I want to know if it is empty further along the way. How can I test that app.db = nil or app.db.name = “”? I tried both ways but NilObjectExeption…

On Open set:

app.db = New SQLiteDatabase

Hi,
You mean:
IF app.db = new Sqlitedatabase?

There shouldn’t be any issues testing for nil, i.e. both

[code]if App.DB = nil then

end if[/code]

and

[code]if App.DB is nil then

end if[/code]

would work. There is no NilObjectException raised as long as you are not actually trying to use the nil value as if it was an object.