Java Database Connection


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Java Database Connection

  1. #1
    Join Date
    Dec 2009
    Posts
    3

    Java Database Connection

    Hello to all,

    I am currently working on my project. The project is a simple java application.(I need to mention that I am not going to code it to be an applet.)

    Anyways, I need to insert some kind of information to mysql database using my java application. But my question is how can my program insert and get information from this database while the program is executed from different machines. I mean how can my program access to database even if I execute it from another machine. (Assuming that database permissions are not public)

    It would be dangerous to make database all public.I can give permissions to particular IPs but this is no solution.

    Additionally, once it is inserted, it is easy to get information. I just need to know how to edit my database.

    Any solutions and ideas are welcome.

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Does this help?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  3. #3
    Join Date
    Dec 2009
    Posts
    3
    Thanks for your consideration. But i must have explained myself wrong. I know how to connect to a database but i just wanted to conenct it not only from my machines but also from other machines.

    But i did it anyway I just wrote a simple php page that connects to my database (in the same root with the database) Then, I show this page on my java application.

  4. #4
    Join Date
    Mar 2005
    Location
    UK, London
    Posts
    150
    Hi calculus, I know you have sorted your problem, but have you though about using java rmi, you could have a server running on the server which hosts the mysql database server. Just a though anyway.

    http://www.snippetbank.net/detail/sn...I-Example.html

  5. #5
    Join Date
    Dec 2009
    Posts
    3
    Thanks major, as a matter of fact, i am unfamiliar with java networking. But for my problem, i am using simple HTTP post.

    Can your suggestion be related to this concept?It looks similar to HTTP requests. This RMI looks cool by the way as far as I do not know anything about it

Similar Threads

  1. Replies: 0
    Last Post: 08-23-2006, 12:21 AM
  2. Replies: 0
    Last Post: 08-23-2006, 12:19 AM
  3. Really Cool 3 tier Java database solution
    By Russ in forum Database
    Replies: 0
    Last Post: 06-04-2002, 12:57 AM
  4. .NET vs. Enterprise Java: Who's Got Better Security?
    By Glen Kunene in forum Talk to the Editors
    Replies: 17
    Last Post: 03-23-2002, 12:43 AM
  5. Java Database Connection Pooling
    By Jimmy O in forum Java
    Replies: 2
    Last Post: 07-11-2001, 12:09 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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center