|
Home > Archive > SQL Server JDBC > October 2005 > Bug is com.microsoft.sqlserver.jdbc.SQLServerDataSource (2005 Beta
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Bug is com.microsoft.sqlserver.jdbc.SQLServerDataSource (2005 Beta
|
|
|
| The following JUnit code fails:
// elided ...
public void testSelectMethod()
{
SQLServerDataSource source = new SQLServerDataSource(
);
source.setSelectMethod("cursor");
assertEquals("cursor", source.getSelectMethod());
}
// elided ...
with:
junit.framework.ComparisonFailure: Select method not set to cursor
expected:<cursor> but was:<null>
at junit.framework.Assert.assertEquals(Assert.java:81)
at test.foo.assumptions.JTASQLTest. testSelectMethod(JTA
SQLTest.java:49)
at sun.reflect. NativeMethodAccessor
Impl.invoke0(Native Method)
at
sun.reflect. NativeMethodAccessor
Impl. invoke(NativeMethodA
ccessorImpl.java:39)
at
sun.reflect. DelegatingMethodAcce
ssorImpl. invoke(DelegatingMet
hodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult. runProtected(TestRes
ult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. runTests(RemoteTestR
unner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. run(RemoteTestRunner
.java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. main(RemoteTestRunne
r.java:196)
--
jef - integralpath.blogs.com
| |
| Matt Neerincx [MSFT] 2005-10-12, 11:23 am |
| Yes we changed the name of the SelectMethod property to
forwardReadOnlyMetho
d.
So you would say:
forwardReadOnlyMetho
d=direct
or
forwardReadOnlyMetho
d=serverCursor
Unfortunately we have not yet updated the SQLServerDataSource class to work
with this new setting yet.
--
Matt Neerincx [MSFT]
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"Joe Weinstein" <joeNOSPAM@bea.com> wrote in message
news:evctk3ozFHA.3312@TK2MSFTNGP09.phx.gbl...
>
>
> jef wrote:
>
>
>
>
> Check the docs. I believe SelectMethod=cursor is now functionally
> meaningless with this version of the driver, and maybe they allow
> you to make the set call, just so it doesn't break existing code
> that was written for the previous driver, that shares zero code
> with this new one. They might also document that getSelectMethod()
> will do what it does...
> I think the best course is to verify my first contention, and
> then just not call either method for this one....
>
> Joe Weinstein at BEA
>
>
| |
| Matt Neerincx [MSFT] 2005-10-17, 1:24 pm |
| Note we are planning on changing this back to allowing selectMethod due to
huge customer demand.
--
Matt Neerincx [MSFT]
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
"jef" <jef@discussions.microsoft.com> wrote in message
news:5FB92280-7932-4722-84AC- 72A3102980E5@microso
ft.com...
> The following JUnit code fails:
> // elided ...
> public void testSelectMethod()
> {
> SQLServerDataSource source = new SQLServerDataSource(
);
> source.setSelectMethod("cursor");
> assertEquals("cursor", source.getSelectMethod());
> }
> // elided ...
>
> with:
>
> junit.framework.ComparisonFailure: Select method not set to cursor
> expected:<cursor> but was:<null>
> at junit.framework.Assert.assertEquals(Assert.java:81)
> at test.foo.assumptions.JTASQLTest. testSelectMethod(JTA
SQLTest.java:49)
> at sun.reflect. NativeMethodAccessor
Impl.invoke0(Native Method)
> at
> sun.reflect. NativeMethodAccessor
Impl. invoke(NativeMethodA
ccessorImpl.java:39)
> at
> sun.reflect. DelegatingMethodAcce
ssorImpl. invoke(DelegatingMet
hodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult. runProtected(TestRes
ult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. runTests(RemoteTestR
unner.java:478)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. run(RemoteTestRunner
.java:344)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner. main(RemoteTestRunne
r.java:196)
>
>
> --
> jef - integralpath.blogs.com
|
|
|
|
|