- This topic has 2 replies, 2 voices, and was last updated 20 years ago by adu.
-
AuthorPosts
-
aduMemberHi,
I am trying to connect to a MSSQL db through the DBExplorer in MyEclispe and am having no luck with it at all. There was a previous post with respect to issues connecting to an MSSQL db, but the suggestions there did not work. I have been able to connect to a MySQL database with no problems.
Here are the details of my system:
OS – WindowsXP, Service pack 2
Eclipse version – 3.0.0, build id – 200406251208
Eclipse was freshly installed for MyEclipse
External Plugins – Eclipse Profiler plugin, Jasper Assistant (trial)
Number of plutins in eclipse/plugins dir like org.eclipse.pde.* = 8
MyEclipse Version – 3.8.2
MyEclipse Build – 200409171200-3.8.2
JDK version – 1.4.2_04 (also for app server)Steps to replicate problem:
1) Window ->Preferences ->MyEclipse ->Database Explorer -> Drivers
2) Microsoft MSSQL Server JDBC Driver doesn’t have check mark.
3) select MSSQL Server, click Edit.
4) Specify URL
5) go to Extra Class Path pane
6) New
7) add pointers to mssqlserver.jar, msutil.jar, msbase.jar files.
8) Click “List Drivers” after selecting any one of these.
9) Nothing shows up in the “Driver Class Name” field. When i tried the same for the MySQL db, the driver class name showed up, and everything worked properly.
Note: c:\eclipse\startup.jar is the file listed in the “Java Class Path” pane.
Note2: when you enter the “edit driver” window, the “Driver Class Name” field is populated with “com.microsoft.jdbc.sqlserver.SQLServerDriver”, but if you click the “List Drivers” button, it disappears.I hope this is detailed enough.
Thanks in advance,
Aditya.
Riyad KallaMemberAditya,
This is a known problem because the driver is split across multiple JAR files (SQLServerDriver in 1 JAR extends BaseDriver in another JAR which implements java.sql.Driver). The fix is to manually type in the entire database driver name.
aduMemberOk. It works once you type in the full driver name and import all three jar files.
Thanks!
-
AuthorPosts