To open a database password protected use
OpenDatabase(<database_name>, false, false, ";pwd=<password>")

I hope this help you...