tell me how to connect to postgresql database using the odbc driver
Why would you want to use an ODBC driver? Do you mean
JDBC driver?
have problems connecting to using a datasource
For us to help, we'll need more information about your problem. What is the Exception? Error message? Stacktrace? Also, post the section of your code where you encounter the problem.