;) was just showing the relevant bits.
>Wouldn't
>
>>IF DBUSED("DATABASENAME")
>> IF SET("DATABASE")#""DATABASENAME"
>> SET DATABASE TO DATABASENAME
>> ENDIF
>ELSE
> OPEN DATABASE DATABASENAME
>>ENDIF
>
>be a bit better?
>[gdr]
>
>
>>I just had occasion to change a small udf that did an unconditional OPEN DATABASE to this...
>>
>>IF DBUSED("DATABASENAME")
>> IF SET("DATABASE")#""DATABASENAME"
>> SET DATABASE TO DATABASENAME
>> ENDIF
>>ENDIF
>>
>>and guess what - the app starts visibly faster and things seem snappier overall. Maybe most programmers and most clients don't care about snappy, but I do. dbused is over 600 times faster than open database. I'll gladly take that.