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
SIr,
working as Software Engineer at MRO-TEK Ltd. ( href="http://www.mro-tek.com">www.mro-tek.com) in India.
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.
piece of code I used to connect to the database on my PC (Local
Host).
try{
Class.forName("com.mysql.jdbc.Driver");
myConnection=DriverManager.getConnection("jdbc:mysql://local host/atenew","root",
"password"); color=#800000>
}
catch(Exception
e){
}
}
is the database name.
to be installed in two or more systems and the database to be in a central
server machine.
in LAN and the server IP is something like 192.168.2.7
make in my code to achieve this?
the utility file that I use to make and close database
connections.
time and consideration,
reply from you,
Balikai
Ltd.
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)--