Does anyone know how to get the name of the actual database file ( access ) that the script is in?

Example: I am using Word.mdb

I run a script in that mdb that needs the fileName Word.mdb ( this is for querying purposes).

How about if using MS SQL?

How do I cleanly get this fileName?