N/APosted on - 05/13/2013
I would like to know how one can use the myob connect odbc object to connect a java application to a database. I would also like a clarification on whether it is possible to use this type of connection object to connect to My SQL and POSTGRESS databases.
How to use the myob connect odbc object
It is very easy to connect Java application to the database, and there is more than one way to do that, there are two ways which I used before 1-Traditional way which you will use Class. forname (jdbc driver), connection class and DriverManager class to connect to the database and use Statement class for retrieving data.
2-Using Frameworks such as Hibernate which I recommend you to use, it maps every table in database to class and every record in the database will be accessed by object of creating class, what you will do in hibernate is to create a configuration file (XML) and mapping files, configuration file will be database connection and mapping files (XML) maps classes to database tables. Hibernate is useful for several database types such as MySQL and posters. I will attach hibernate PowerPoint tutorials and Java code examples which demonstrate two ways and I hope they will help you.
http://www.mkyong.com/hibernate/quick-start-maven-hibernate-mysql-example/ this link demonstrate how to use hibernate with MySQL server database
https://stackoverflow.com/questions/108171/hibernate-3-unable-to-query-postgresql-database link for using hibernate with postgress