Showing posts with label driver. Show all posts
Showing posts with label driver. 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!

Friday, March 23, 2012

getGeneratedKeys

Does the current driver support getGeneratedKeys? If not when will it?
I can't believe there is nobody who can answer this seemingly obvious
question. Doesn't anybody from microsoft ever look at this forum?
"bobmanc" wrote:

> Does the current driver support getGeneratedKeys? If not when will it?
|||The current driver is JDBC 2.0 spec and doesn't support getGeneratedKeys.
It's on the feature list for the SQL Server 2005 driver.
-shelby
Shelby Goerlitz
Microsoft SQL Server
"bobmanc" <bobmanc@.discussions.microsoft.com> wrote in message
news:E99AA36E-0040-4121-8F75-A7B094AB0276@.microsoft.com...[vbcol=seagreen]
> I can't believe there is nobody who can answer this seemingly obvious
> question. Doesn't anybody from microsoft ever look at this forum?
> "bobmanc" wrote:

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

Monday, March 19, 2012

Get trailing spaces when import data from FoxPro

Hi,

We have a problem regarding the Visual FoxPro OLEDB driver. When we import data from FoxPro into SQLIS using Microsoft OLE DB Driver for Visual FoxPro, all string fields get spaces upto the it's field length.

Example:
Column A has a length of 10 characters. If we insert "bob" into that field in FoxPro and then read it from FoxPro and store it into SQL server. The resulting value in column A in SQL Server will be "bob ".

We are reading data from booth Visual Fox Pro and FoxPro using the same driver, we can't seem to find any OLE DB driver for FoxPro.

We have a solution which is to trim all the fields before storing them in SQL Server, but that we give us ALOT of work.

Is there anyone who has experienced the same problem and has an more elegant solution?Have you considered using the Derived Column transform in the data flow to trim your string columns?

Thanks.|||We have considered that solution, but that is our last option, as we have 50 tables and about 5-10 string columns in each... :(

So if there are anyone out there who has experienced the same problem with FoxPro and who has figured out some nice solution with the driver. We would highly appreciate to take advantage of your experiences..

Best regards,

Mattias