Showing posts with label jdbc. Show all posts
Showing posts with label jdbc. Show all posts

Monday, March 26, 2012

getMoreResults(Statement.KEEP_CURRENT_RESULT) problem

Hi,
I am using Microsoft JDBC driver (SP2) in order to communicate with my
application.
When calling the Statement's getMoreResults() method with a
Statement.KEEP_CURRENT_RESULT parameter, the driver throws the following
exception:
java.lang.AbstractMethodError:
com.microsoft.jdbc.base.BaseCallableStatement.getM oreResults(I)Z
However, when I dropped the KEEP_CURRENT_RESULT everything went smoothly.
In both ways I am using a TYPE_SCROLL_INSENSITIVE and a CONCUR_READ_ONLY
when executing a query.
Since I really need to keep the previous results for display (for example
when calling for EXEC sp_monitor), I can't "live" without the
KEEP_CURRENT_RESULT argument.
Is there any known way around it?
Thanks!
Shaji,
The KEEP_CURRENT_RESULT parameter is a JDBC 3.0 spec function. The
Microsoft JDBC driver (SP2) does not support JDBC 3.0 spec functions.
There is no work around with this driver.
DataDirect recently released a version of our driver which does
support this parameter. It is supported in our 3.4 release. If you
would like to download an evaluation copy of the driver, go to
http://www.datadirect.com/downloads/...jdbc/index.ssp
Sue Purkis
DataDirect Technologies
"Shaji" <shji1@.yahoo.com> wrote in message news:<O#p6#YhTEHA.1368@.TK2MSFTNGP11.phx.gbl>...
> Hi,
> I am using Microsoft JDBC driver (SP2) in order to communicate with my
> application.
> When calling the Statement's getMoreResults() method with a
> Statement.KEEP_CURRENT_RESULT parameter, the driver throws the following
> exception:
> java.lang.AbstractMethodError:
> com.microsoft.jdbc.base.BaseCallableStatement.getM oreResults(I)Z
> However, when I dropped the KEEP_CURRENT_RESULT everything went smoothly.
> In both ways I am using a TYPE_SCROLL_INSENSITIVE and a CONCUR_READ_ONLY
> when executing a query.
> Since I really need to keep the previous results for display (for example
> when calling for EXEC sp_monitor), I can't "live" without the
> KEEP_CURRENT_RESULT argument.
> Is there any known way around it?
> Thanks!

Wednesday, March 21, 2012

GetBytes issue

We recently change our application from Sun JDBC-ODBC
bridge driver to MS SQLServer JDBC driver and one of our
functionality is failing and after debuging dound that
getByte mentod is not retrving the data correctly rather
it change the data. The code is working fine with JdbcOdbc
driver, here is the sample code.
Any help is appreciated.
Thanks
Syed
stmt = objUtil.getConnection().createStatement();
result = stmt.executeQuery(strSQL);
byte[] gbArrKS = null;
while (result.next()){
gbArrKS= result.getBytes("BinrydataCol");
}
Hi. You'll get your best help if you describe the definition of the table
column, and maybe also show what the data really is.
thanks,
Joe Weinstein at BEA
Syed Hussain wrote:

> We recently change our application from Sun JDBC-ODBC
> bridge driver to MS SQLServer JDBC driver and one of our
> functionality is failing and after debuging dound that
> getByte mentod is not retrving the data correctly rather
> it change the data. The code is working fine with JdbcOdbc
> driver, here is the sample code.
> Any help is appreciated.
> Thanks
> --
> Syed
> stmt = objUtil.getConnection().createStatement();
> result = stmt.executeQuery(strSQL);
> byte[] gbArrKS = null;
> while (result.next()){
> gbArrKS= result.getBytes("BinrydataCol");
> }
>
sql