It would help if you posted the actual compilation errors, and the runtime stack trace.
But certainly, getConnection() takes a url string, a username and a password.
--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
http://www.primrose.org.uk