Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-13-2007, 11:06 AM
Member
 
Join Date: Aug 2007
Posts: 1
elish11 is on a distinguished road
SQL server
Hi I am beginner in java;
I want connect to sql server 2005;
but i have error
"The connection to the named instance has failed."
please help me
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-14-2007, 01:13 PM
Member
 
Join Date: Dec 2007
Posts: 32
felixtfelix is on a distinguished road
Connection connection = null;
Class.forName("com.microsoft.sqlserver.jdbc.SQLSer verDriver");
connection = DriverManger.getconnection("jdbc:sqlserver://servername:1488;selectMethod=cursor","username","p assword");
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-20-2008, 07:00 PM
Member
 
Join Date: Aug 2008
Posts: 13
herfnai is on a distinguished road
hello you must make odbc and:
Connection cn=null;
Statement stm=null;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
cn=DriverManager.getConnection("jdbcdbc:database name");
stm=cn.createStatement(ResultSet.TYPE_SCROLL_SENSI TIVE,
ResultSet.CONCUR_UPDATABLE);
JOptionPane.showMessageDialog(null,"connected");

}catch(Exception e)
{JOptionPane.showMessageDialog(null,"eroor" +"\n"+e.getMessage());


}
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web-App server connection - How to hit the particular app server from the web server maruthi_s Enterprise JavaBeans 2 07-15-2008 07:11 PM
Connecting to a Web server Java Tip java.net 0 04-07-2008 08:57 PM
One server to another server redirection chaudhuri_abhi Java Servlet 1 02-11-2008 08:05 PM
MySpeed Server 7.3b JavaBean Java Announcements 0 09-26-2007 01:24 PM
WAS Server Albert Enterprise JavaBeans 1 06-25-2007 06:38 AM


All times are GMT +3. The time now is 04:02 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org