Results 1 to 5 of 5

Thread: Java Applet & MySQL Database

  1. #1
    Member
    Join Date
    Jul 2003
    Location
    Shefflield (Currently at uni in staffs)
    Posts
    149
    Thanks
    0
    Thanked
    0 times in 0 posts

    Java Applet & MySQL Database

    Hi everyone, I am currently trying to connect a java applet to a database I have created in MySQL. I am aware of the security limitations of the applet, and the setup I have is a mac that is acting as a server running MAMP, and a PC connected via a router to the mac acting as the client. When I run the applet on the mac it connects to the database successfully, however when I try on the PC (client all I get is null for the data, no security exceptions etc).

    Any ideas of what the problem is or how I can bypass it, (have been looking at servlets as a means of passing data via a web site to the db but am unsure of the terminology and where to start so again any help would be great)

    Thanks in advance.

  2. #2
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,164
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts
    it might well be an issue with the configuration of the MySQL server not allowing foreign connections?

    How do you mean ur getting null for the data? Are you getting 0 rows for a query or sproc?
    throw new ArgumentException (String, String, Exception)

  3. #3
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts
    You mention that the database connects successfully on the mac, is it also doing so when you attempt to connect remotely? Try examining the DatabaseMetaData object returned by Connection.getMetaData(). It stores a extensive set of information.
    To err is human. To really foul things up ... you need a computer.

  4. #4
    Member
    Join Date
    Jul 2003
    Location
    Shefflield (Currently at uni in staffs)
    Posts
    149
    Thanks
    0
    Thanked
    0 times in 0 posts
    thanks for the reply, would've replied sooner but been a busy week, i tried to return the Meta data and all I got was null as in all the other data I try to retrieve.

    I checked through my SQL settings and I believe everything looks ok in terms of permissions etc.

    I am relatively new to Java and MYSQL so it could be something completely random to do with updating the applet or something but I doubt that as all the values are retrieved before creating the GUI,

    I changed the address from localhost to 192..... etc in order to ensure a connection was made to the mac (server) from the PC (client) but still get the same problem.

    Any ideas?

  5. #5
    Chillie in here j.o.s.h.1408's Avatar
    Join Date
    Dec 2005
    Location
    a place called home
    Posts
    8,543
    Thanks
    757
    Thanked
    256 times in 193 posts
    • j.o.s.h.1408's system
      • Motherboard:
      • ASUS P6T Delux
      • CPU:
      • Intel core i7 920 @ 3ghz
      • Memory:
      • 3GB DDR RAM
      • Storage:
      • 1TB Samsung F1, 500GB Seagate baracuda + 320gb Seagate PATA +150GB WD PATA
      • Graphics card(s):
      • EVGA 480GTX SC edition
      • PSU:
      • Seasonic M12 600W Module PSU FTW
      • Case:
      • Lian Li PC-A7010B (the rolls royce of pc cases)
      • Operating System:
      • vista ultimate edition and windows xp
      • Monitor(s):
      • 22inch 2005FPW dell monitor
      • Internet:
      • 24mb BE There Broadband
    you could try using a servlett instead of an applet? servlets are designed for the proposed taks in mind

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. mysql & database help
    By 5cupa in forum Software
    Replies: 11
    Last Post: 20-12-2005, 11:13 AM
  2. creating a database type system in java
    By jonneymendoza in forum Software
    Replies: 85
    Last Post: 03-11-2005, 09:45 PM
  3. Replies: 1
    Last Post: 20-10-2004, 09:01 AM
  4. Using a switch statement and MySQL database
    By Kezzer in forum Software
    Replies: 2
    Last Post: 15-10-2004, 01:37 PM

Posting Permissions

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