eh.
not sure what this returns:
code:
olecallfunc ( $dbe, "opendatabase", "s", "$database" )

but I bet it's not string nor integer.
if it's object or something else than string, try to remove your val() around it.

mm... what more I think of it, it looks like object "pointer" or reference of somekind, not a val-able stuff at all.
_________________________
!

download KiXnet