Can you connect in design time?
Provide the password to connection component, and everything needed to connect. Then set connected to true.
Then, with active database connection, you should be able to do it.
After that, you can (and should) close the connection, remove the password from object inspector...