I have a method that call a stored procedure and I seem to be getting the following error:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.wja.jms.Test01.TestWriteMessageToDB.updateTables(TestWriteMessageToDB.java:166)
at com.wja.jms.Test01.TestWriteMessageToDB.main(TestWriteMessageToDB.java:41)
at com.wja.jms.Test01.TestJMSSubscriber01.onMessage(TestJMSSubscriber01.java:113)
at com.seebeyond.jms.client.STCMessageConsumer.onMessage(STCMessageConsumer.java:515)
at com.seebeyond.jms.client.STCSession.onMessage(STCSession.java:253)
at com.seebeyond.jms.sockets.ConsumerSocket.deliverMessage(ConsumerSocket.java:337)
at com.seebeyond.jms.sockets.ThreadPerConnectionMgr$ConnThread.run(ThreadPerConnectionMgr.java:230)
I have also included the code below: The database is called resend as noted below.
CallableStatement cs;
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection mYconnection = DriverManager.getConnection ("jdbc:microsoft:sqlserver://localhost:1433/resend", "wade", "pass");
// Call a procedure with one IN parameter
cs = mYconnection.prepareCall("call update_rsnd_Counter_1(?,?,?,?,?,?,?,?,?)");
// Set the value for the IN parameter
cs.setInt(1,0);
cs.setInt(2, 100);
cs.setString(3, "managerwa");
cs.setString(4, "serverwa");
cs.setInt(5, 25600);
cs.setString(6, "eventTypewa");
cs.setString(7, "T");
cs.setString(8, "2005-11-30");
cs.setString(9, "This is an awsome test that may fail");
// Execute the stored procedure
cs.execute();