Unix Technical Forum

problem upgrading to newest ms sql server drivers

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 ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 08:34 PM
Barclay A. Dunn
 
Posts: n/a
Default problem upgrading to newest ms sql server drivers

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:45 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com