why does mybatis shows The fetch direction 1,001 is not valid.?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

why does mybatis shows The fetch direction 1,001 is not valid.?

Ran Ji
I don't use the setdirection function,but when i execute the code ,the console shows error .
How do i fix the error?

### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The fetch direction 1,001 is not valid. 
; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; The fetch direction 1,001 is not valid.; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The fetch direction 1,001 is not valid. 

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: why does mybatis shows The fetch direction 1,001 is not valid.?

Guy Rouillier-2
On Wed, 2018-10-17 at 06:08 -0700, Ran Ji wrote:

> I don't use the setdirection function,but when i execute the code
> ,the console shows error .
> How do i fix the error?
>
> > ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The
> > fetch direction 1,001 is not valid.
> > ; uncategorized SQLException for SQL []; SQL state [null]; error
> > code [0]; The fetch direction 1,001 is not valid.; nested exception
> > is com.microsoft.sqlserver.jdbc.SQLServerException: The fetch
> > direction 1,001 is not valid.
> >

Browsing the API docs reveals this:

public static final int FETCH_REVERSE 1001

Apparently, the version of SQL Server you are using does not support
this feature.  If you are likely to encounter this situation, you can
query feature support prior to using it, in order to avoid the
exception.

--
Guy Rouillier

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: why does mybatis shows The fetch direction 1,001 is not valid.?

Ran Ji
Thank you 

在 2018年10月18日星期四 UTC+8下午2:14:41,Guy Rouillier写道:
On Wed, 2018-10-17 at 06:08 -0700, Ran Ji wrote:

> I don't use the setdirection function,but when i execute the code
> ,the console shows error .
> How do i fix the error?
>
> > ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The
> > fetch direction 1,001 is not valid.
> > ; uncategorized SQLException for SQL []; SQL state [null]; error
> > code [0]; The fetch direction 1,001 is not valid.; nested exception
> > is com.microsoft.sqlserver.jdbc.SQLServerException: The fetch
> > direction 1,001 is not valid.
> >

Browsing the API docs reveals this:

public static final int         FETCH_REVERSE         1001

Apparently, the version of SQL Server you are using does not support
this feature.  If you are likely to encounter this situation, you can
query feature support prior to using it, in order to avoid the
exception.

--
Guy Rouillier

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: why does mybatis shows The fetch direction 1,001 is not valid.?

Erwan Letessier
com.microsoft.sqlserver.jdbc.SQLServerException
It is the jdbc driver that throws exception, Mybatis just forwards it.


On Thu, Oct 18, 2018, 08:55 Ran Ji <[hidden email]> wrote:
Thank you 

在 2018年10月18日星期四 UTC+8下午2:14:41,Guy Rouillier写道:
On Wed, 2018-10-17 at 06:08 -0700, Ran Ji wrote:

> I don't use the setdirection function,but when i execute the code
> ,the console shows error .
> How do i fix the error?
>
> > ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The
> > fetch direction 1,001 is not valid.
> > ; uncategorized SQLException for SQL []; SQL state [null]; error
> > code [0]; The fetch direction 1,001 is not valid.; nested exception
> > is com.microsoft.sqlserver.jdbc.SQLServerException: The fetch
> > direction 1,001 is not valid.
> >

Browsing the API docs reveals this:

public static final int         FETCH_REVERSE         1001

Apparently, the version of SQL Server you are using does not support
this feature.  If you are likely to encounter this situation, you can
query feature support prior to using it, in order to avoid the
exception.

--
Guy Rouillier

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.