-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: having a problem in updatingmysql database
PostPosted: Mon Jun 15, 2009 10:11 am 
Newbie

Joined: Mon Jun 15, 2009 10:04 am
Posts: 1
Hi all,

I am using following code, but evry time i try to use it, I get the error " Communications link failure". Can anybody help??

Connection con = null;
Statement stmt = null;
ResultSet rs = null;
try {
Class.forName("com.mysql.jdbc.Driver");
log.info("Creating connection with the database");
///////it doesn't go to the next log statement/////////
con =DriverManager.getConnection ("jdbc:mysql://192.168.1.10:3306/project2","", "");
log.info("connection made");
stmt = con.createStatement();
//rs = stmt.executeQuery("insert into CallEvent values('1','2','3','4','5','6','7','8')");

}

catch(Exception e)
{
log.error(e);

}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.