Results 1 to 2 of 2
Thread: getting database connection
- 11-21-2009, 08:29 AM #1
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
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
- 11-22-2009, 03:01 AM #2
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.
Similar Threads
-
Database connection for applet
By danielsl89 in forum Java AppletsReplies: 2Last Post: 10-21-2009, 01:24 PM -
database connection in jsf
By Srikala in forum JavaServer Faces (JSF)Replies: 0Last Post: 10-06-2008, 07:53 AM -
Database Connection
By CompleteBeginner in forum New To JavaReplies: 2Last Post: 05-24-2008, 03:30 PM -
Database Connection
By vipinkumarsolanki in forum Advanced JavaReplies: 2Last Post: 11-26-2007, 07:36 AM -
Database connection
By oaklander in forum New To JavaReplies: 2Last Post: 11-13-2007, 12:11 AM
Bookmarks