Unable to connect to database through Applet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ykhamitkar
    New Member
    • May 2007
    • 64

    Unable to connect to database through Applet

    Hi there,

    I am trying to create a web based dataentry application in java applet.
    When I create a standalone application using applet the database connectivity works fine. However when I use same applet in web page the, connectivity doesnt work.

    my backend is MS Access file and I am using JDBC ODBC database connectivity.

    Please advice

    Thanks

    Yogesh
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by ykhamitkar
    Hi there,

    I am trying to create a web based dataentry application in java applet.
    When I create a standalone application using applet the database connectivity works fine. However when I use same applet in web page the, connectivity doesnt work.

    my backend is MS Access file and I am using JDBC ODBC database connectivity.

    Please advice

    Thanks

    Yogesh
    What happens when you run it from the web page?

    Comment

    • ykhamitkar
      New Member
      • May 2007
      • 64

      #3
      Originally posted by r035198x
      What happens when you run it from the web page?

      Hi,

      When I run it on web page and do any data entry. It doesnt give me any error but doesnt even update data in the MS Access database

      Please advice

      Thanks

      Yogesh

      Comment

      • BigDaddyLH
        Recognized Expert Top Contributor
        • Dec 2007
        • 1216

        #4
        Originally posted by ykhamitkar
        When I run it on web page and do any data entry. It doesnt give me any error but doesnt even update data in the MS Access database
        Are you sure? Do you have the Java console window open in your browser? Put some System.out.prin tln statements in your code so that you can see the code's progress, and make sure there is nowhere you catch an exception only to squelch it:

        [CODE=Java]
        } catch(SomeExcep tion e) {
        //silence
        }[/CODE]

        Generally speaking, connecting to a database from an applet is a bad idea, because most of the time, your database server and your web server are different machines, while applets are restricted to only connecting back to the web server.

        I'm biased because I dislike applets, but I would rewrite this as a proper web application with servlets and JSP.

        Comment

        • sanvedana
          New Member
          • Mar 2008
          • 2

          #5
          Originally posted by ykhamitkar
          Hi there,

          I am trying to create a web based dataentry application in java applet.
          When I create a standalone application using applet the database connectivity works fine. However when I use same applet in web page the, connectivity doesnt work.

          my backend is MS Access file and I am using JDBC ODBC database connectivity.

          Please advice

          Thanks

          Yogesh
          hi,
          i know it for frames but can you please tell me the java code for connecting applet to the MS Access on the same machine

          Comment

          Working...