Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

accessing database ingres 6.4

 
Pinto K Geevarghese
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
Can I take data from ingres 6.4 database with java ?
What is the driver ? How can I connect to ingres 6.4 from java servlet ?
please reply asap ...
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll move this to the JDBC forum for you.
Dave
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can find a driver by checking the Driver Search Page here.
It lists 13 companies that provide Ingres drivers.
If you've never used JDBC before, it's probably best to begin by writing a couple of stand-alone applications that access the database before trying to write it in to a servlet.
Likewise, if you've never written a servlet, start by configuring the server and writing a couple of simple non-JDBC servlets to start with.
JDBC in Servlets is very similar except for a couple of minor differences. Firstly the driver libraries need to be configured in the web-application classpath, not the system classpath. Most people fall over this.
Secondly, if you're using a J2EE app server and not just a simple servlet container, you should get Connections via a server-provided DataSource rather than getting them from the DriverManager. This is much the same as using the DriverManager, but the Driver gets configured in the application server and is given a name where it can be found using JNDI. When you connect to the database, you get the DataSource from JNDI by this name and get a Connection from it. This allows the server to manage Connection resources and reduce problems like the time it takes to create a new Connection and applications that try to choke the database, stopping anyone else from getting in.
Hope this helps,
Dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic