Click here to Skip to main content
15,923,120 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i did a program to save inquiries and send those inquiries to people who responsible.
i have completed the application and we have 20 networked computers with me.
i wanted to install the program to each computer and runs it.

when someone login into my application,
user have to fill the form and when they submit it.. email goes to responsible user.
and the other end data goes to database and save.
so now i want to do this same procedure in another computer.

Java
try{
        Class.forName("com.mysql.jdbc.Driver");
        connect=DriverManager.getConnection("jdbc:mysql://localhost:3306/userdb","root","");
        preSt=connect.prepareStatement("insert into enqsheet values(?,?,?,?,?,?,?,?,?,?)");


what happened if i put my ipaddress instead localhost or how can i make it accessible from other computers.

is there any possible way to attach this database for each application?

What I have tried:

i have clean and build the application.
then i got java.jar file.
i double clicked it and opened it in another computer.
so it gives packet not sent and communication error.
but email will send to the user.
Posted
Comments
Richard MacCutchan 6-Apr-16 5:40am    
localhost means the computer that is running the application. If you want the database accessible from many different systems then you need to use a server, that all systems can connect with.
Hemas Ilearn 6-Apr-16 5:48am    
that means localhost has to change into ip address?
Herman<T>.Instance 20-May-16 3:43am    
yup

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900