CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 1999
    Posts
    1

    Servlets and Databases - JDBC



    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.

  2. #2
    Join Date
    Mar 1999
    Posts
    7

    Re: Servlets and Databases - JDBC



    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured