Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-21-2009, 08:29 AM
Member
 
Join Date: Nov 2009
Posts: 4
Rep Power: 0
ravidasineni is on a distinguished road
Default getting database connection
I am doing an application in netbeans.In that i selcect NewProject -->java--> java desktop application --> basic application --> finish.

In that i connect database like this

Class.forName("com.microsoft.sqlserver.jdbc.SQLSer verDriver");
conn = DriverManager.getConnection("jdbc:sqlserver://medjava04:1433;databaseName=appforum;userName=sa") ;

in that i loaded drivers but connection is not getting.

please help me
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-22-2009, 03:01 AM
travishein's Avatar
Senior Member
 
Join Date: Sep 2009
Location: Canada
Posts: 280
Rep Power: 1
travishein is on a distinguished road
Default
JDBC has two pieces to it. the API (interfaces) that come with java, and the vendor-supplied database driver (implementation). In your case, because you are trying to connect to the Microsoft SQL server, have you downloaded their JDBC driver .jar file and placed it somewhere into the classpath that is accessible by netbeans or java applications (such as as the JRE/lib/ext/ folder

I'm pretty sure the default netbeans IDE would not come with the MS-SQL database (or any other database product for that matter). JDBC drivers.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

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

BB 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
Database connection for applet danielsl89 Java Applets 2 10-21-2009 01:24 PM
database connection in jsf Srikala JavaServer Faces 0 10-06-2008 07:53 AM
Database Connection CompleteBeginner New To Java 2 05-24-2008 03:30 PM
Database Connection vipinkumarsolanki Advanced Java 2 11-26-2007 07:36 AM
Database connection oaklander New To Java 2 11-13-2007 12:11 AM


All times are GMT +2. The time now is 12:26 AM.



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