This is a discussion on problem upgrading to newest ms sql server drivers within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> hi, we just installed new releases of drivers msbase.jar, mssqlserver.jar, msutil.jar. i'm seeing code that worked with the initial ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hi, we just installed new releases of drivers msbase.jar, mssqlserver.jar, msutil.jar. i'm seeing code that worked with the initial release of the ms sql drivers now not working. here's the code: // please assume that conn_ is acquired and working Connection conn_ = ds.getConnection(); CallableStatement stmt_ = conn_.prepareCall("{ Call get_games_all } "); ResultSet result_ = stmt_.executeQuery(); this produces the following error: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near '{'. at com.microsoft.jdbc.base.BaseExceptions.createExcep tion (Unknown Source) at com.microsoft.jdbc.base.BaseExceptions.getExceptio n (Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sErrorTok en(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReplyTok en(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest .processR eplyToken(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.proces sReply (Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplStatemen t.getNext ResultType(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.commonTransi tionToSta te(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.postImplExec ute (Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.post ImplExecu te(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.commonExecut e (Unknown Source) at com.microsoft.jdbc.base.BaseStatement.executeQuery Internal (Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.exec uteQuery (Unknown Source) at org.apache.commons.dbcp.DelegatingCallableStatemen t.execute Query(DelegatingCallableStatement.java:153) at org.apache.jsp.TEST_DB_jsp._jspService (TEST_DB_jsp.java:60) if i replace the CallableStatement line above with the following, i get the desired results: PreparedStatement stmt_ = conn_.prepareStatement("exec get_games_all"); if i HAVE TO in the interest of expediency, i will change this everywhere it appears in my code - 660 occurrences in 224 files - but since i believe this is java standards compliant code, i would rather find a fix that solves the problem, rather than execute a kluge that works around it. thanks in advance to all who help. Barclay |