Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]

843859Oct 19 2005 — edited Nov 20 2014
Hi

I have sussessfully made a JDBC connection to MS SQL Server 2000 within a JSP hosted within Tomcat but am unable to access any tables or stored procedures and get the following sql exceptions.

Accessng tables:-
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name '*tableName*'

Accessing stored procedures:-
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer] Could not find stored procedure '*storedprocedurename*'

The connection code within my JSP reads:-

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");

conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://SPRI11D11008:1433;database=d_dbmdc001;user=USERNAME;password=PASSWORD");

if(conn!=null) out.println("Connection Successful!");

Statement stmt = conn.createStatement();

query = "exec dbo.CAR_PARK_Incidents '0','0','0'";
rset = stmt.executeQuery(query);

All the permissions appear to be set up ok on the tables/SP's however the exceptions persist. I don't think it's a driver issue as I have entered the relevant .jar files to the classpath and are contained with C:\Program Files\Apache Group\Tomcat 4.1\common\lib in Tomcat. I have also resorted to downloading SP4 as a final option.

I would be very grateful if someone can offer any suggestions/pointers on how to get round this problem and/or whats causing it.

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 29 2007
Added on Oct 19 2005
2 comments
86 views