How to connect to the remote database using JDBC?

How to connect to the remote database using JDBC?

am 16.06.2005 10:50:23 von UMESH BALIKAI - FAC

--Boundary_(ID_FNswJBSapQCjVSp3fr8bmw)
Content-type: multipart/alternative;
boundary="Boundary_(ID_4ixOs5QHfddSsmz16JRy6w)"


--Boundary_(ID_4ixOs5QHfddSsmz16JRy6w)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT

Hello SIr,

I am Umesh Balikai, working as Software Engineer at MRO-TEK Ltd. (
www.mro-tek.com) in India.

I am developing a GUI for one of our products and have used JDK1.5.0 for
that. Also, I designed a small database using MySQL and everything is
working fine as long as both the GUI and Database are on the same
system.


Following is the piece of code I used to connect to the database on my
PC (Local Host).

public void init(){

try{

Class.forName("com.mysql.jdbc.Driver");

myConnection=DriverManager.getConnection("jdbc:mysql://local host/atenew"
,"root", "password"); }
catch(Exception e){
}
}


atenew is the database name.

Now, I want the GUI to be installed in two or more systems and the
database to be in a central server machine.
All the clients are in LAN and the server IP is something like
192.168.2.7

What change should I make in my code to achieve this?

Attached herewith is the utility file that I use to make and close
database connections.


Thank you for your time and consideration,

Looking forward to a reply from you,

Sincerely,

Umesh Balikai
MRO-TEK Ltd.
Bangalore, India.

--Boundary_(ID_4ixOs5QHfddSsmz16JRy6w)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT






Hello
SIr,

class=578383908-16062005> 

I am Umesh Balikai,
working as Software Engineer at MRO-TEK Ltd. ( href="http://www.mro-tek.com">www.mro-tek.com) in India.

class=578383908-16062005> 

I am developing a
GUI for one of our products and have used JDK1.5.0 for that. Also, I designed a
small database using MySQL and everything is working fine as long as both the
GUI and Database are on the same system.

class=578383908-16062005> 

class=578383908-16062005> 

Following is the
piece of code I used to connect to the database on my PC (Local
Host).

class=578383908-16062005> 

color=#800000>public void init(){
   

      
try{
       

       
Class.forName("com.mysql.jdbc.Driver");
       
myConnection=DriverManager.getConnection("jdbc:mysql://local host/atenew","root",
"password");
color=#800000>       
}
        catch(Exception
e){
        }
   
}

class=578383908-16062005> 

class=578383908-16062005> 

atenew
is the database name.

class=578383908-16062005> 


Now, I want the GUI
to be installed in two or more systems and the database to be in a central
server machine.

All the clients are
in LAN and the server IP is something like 192.168.2.7

class=578383908-16062005> 

What change should I
make in my code to achieve this?

class=578383908-16062005> 

Attached herewith is
the utility file that I use to make and close database
connections.

class=578383908-16062005> 

class=578383908-16062005> 

Thank you for your
time and consideration,

class=578383908-16062005> 

Looking forward to a
reply from you,

class=578383908-16062005> 

class=578383908-16062005>Sincerely,

class=578383908-16062005> 

Umesh
Balikai

MRO-TEK
Ltd.

Bangalore,
India.


--Boundary_(ID_4ixOs5QHfddSsmz16JRy6w)--


--Boundary_(ID_FNswJBSapQCjVSp3fr8bmw)
Content-Type: text/plain; charset=us-ascii


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org
--Boundary_(ID_FNswJBSapQCjVSp3fr8bmw)--