Home arrow static arrow Java Programming [Archive] - MSSQL JDBC driver
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - MSSQL JDBC driver
10 Duke Stars available
This topic has 1 reply on 1 page.

Posts:1
Registered: 8/5/04
MSSQL JDBC driver  
Aug 5, 2004 7:48 AM



 
Hi there, I'm attempting to creaet a java interface with an SQL database on an MSQL server but am not having much luck setting up the JDBC and MS SQL Server 2000 driver in netbeans... any help that anyone can give me will be much appreciated!

I have netbeans setup and installed the SQL server driver, the entries for the 3 jar files that come with the driver are in my windows (NT4.0) classpath but netbeans isn't finding classes.

a sample of the code I have written thus far is:

try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
}
catch(ClassNotFoundException e){ }
SQLServerConnection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://rworlddev:1433","AssetRegister","assets");

but it is getting the following errors:

testGUI.java [22:1] cannot resolve symbol
symbol : class SQLServerConnection
location: class testGUI
SQLServerConnection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://rworlddev:1433","AssetRegister","assets");

So it isn't finding the class, although when i right click the SQLServerConnection text and go to "Go to source" i get a text box saying:

"Source com.microsoft.jdbc.sqlserver.SQLServerConnection not found in Filesystems"

I have mounted all three jar files and they are appearing in the filesystems, but should i mount the jar files from the com directory? it seems like it's mounted one level 'too high' although I'm not sure if this can even be done in netbeans..

Thanks for any help!
 

Posts:7,258
Registered: 1/31/02
Re: MSSQL JDBC driver  
Aug 5, 2004 7:58 AM (reply 1 of 1)



 
You might change that "SQLServerConnection" to just be the Connection interface. This likely won't solve your problem though.

Can you get Netbeans to tell you what classpath it's using? You might go ahead and drop the jar that contains your JDBC driver into your extension directory ($JAVA_HOME/jre/lib/ext) and see if that helps.

Good Luck

Lee
 
This topic has 1 reply on 1 page.