Ólafur Marteinsson
February 18th, 1999, 02:00 PM
I am trying to find an example of connecting to an access database with a servlet.
Also if anyone knows about the best driver for the job, than that info would be good too.
Thanks.
Óli.
Davender Pratap Singh
February 24th, 1999, 12:00 AM
Hye,
It's extremely simple. I'd suggest you to goto sites like http://www.sys-con.com, http://www.servletcentral.com. They have ready sample code which you could use!
In case you can't find anything, mail me anytime you want to and I'll send you some of my sample code.
Anyways, if you already know how to make servlets, remember to load the DataBase drivers and open the connection to the database in the init() method of the servlet. Once you've done this, you have an open funnel for all users who would want to access the database. In case you don't do this, for every user, a new dbconnection would have to be opened which isnt exactly a good programming practise.
Long live Java.
Davender aka JaVaFLow