|
Home > Archive > SQL Anywhere database > April 2005 > Behaviour change Max() using ADO between 9.0.1 and 9.0.2
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 |
Behaviour change Max() using ADO between 9.0.1 and 9.0.2
|
|
| Erik Huisman 2005-04-14, 7:23 am |
| The following vbscript snipplet always return EOF using 9.0.2.2451, using
9.0.1.1751 the sql statement returns the correct max(EqmId)
Dim EqmMax
Set EqmMax = CreateObject("ADODB.Recordset")
EqmMax.CursorType = adOpenKeyset
EqmMax.Source = "SELECT Max(EqmId) EqmMax FROM DBA.Equipment "
EqmMax.ActiveConnection = ummConn
EqmMax.Open
If EqmMax.EOF Then
MsgBox "No records found"
Else
EqmMax.MoveFirst
If i change the .CursorType to adOpenForwardOnly it works correct in both
versions of ASA.
My question is if this is a bug or expected behaviour under 9.0.2.2451?
Erik Huisman
| |
| Andrei Iliev 2005-04-14, 9:23 am |
| Try CursorType other than Keyset (e.g. adOpenForwardOnly or adOpenStatic )
as workaround the problem.
I think it is a bug in ODBC provider rather than in ASA db engine itself.
Andrei Ileiv
"Erik Huisman" <spam@spam.com> wrote in message
news:425e583d$1@foru
ms-2-dub...
> The following vbscript snipplet always return EOF using 9.0.2.2451, using
> 9.0.1.1751 the sql statement returns the correct max(EqmId)
> Dim EqmMax
> Set EqmMax = CreateObject("ADODB.Recordset")
> EqmMax.CursorType = adOpenKeyset
> EqmMax.Source = "SELECT Max(EqmId) EqmMax FROM DBA.Equipment "
> EqmMax.ActiveConnection = ummConn
> EqmMax.Open
>
> If EqmMax.EOF Then
> MsgBox "No records found"
> Else
> EqmMax.MoveFirst
>
> If i change the .CursorType to adOpenForwardOnly it works correct in both
> versions of ASA.
> My question is if this is a bug or expected behaviour under 9.0.2.2451?
>
> Erik Huisman
>
>
| |
| Erik Huisman 2005-04-14, 9:23 am |
| Andrei,
I also found out (see message) that adOpenForwardOnly solves the problem.
The problem is easy to reproduce (on a local machine also running the
engine), using a 9.0.1 engine running it works ok, start a 9.0.2 engine on
the same machine, the problem occurs.
Thanks, for your reply.
Erik
"Andrei Iliev" <xzxz@mail.ru> wrote in message
news:425e6aa7$1@foru
ms-2-dub...
> Try CursorType other than Keyset (e.g. adOpenForwardOnly or adOpenStatic )
> as workaround the problem.
> I think it is a bug in ODBC provider rather than in ASA db engine itself.
>
> Andrei Ileiv
>
>
> "Erik Huisman" <spam@spam.com> wrote in message
> news:425e583d$1@foru
ms-2-dub...
>
>
| |
| Chris Keating \(iAnywhere Solutions\) 2005-04-14, 9:23 am |
| Please feel free to submit this to iAnywhere for investigation.
Within North America, you can reach Technical Support by calling
1-800-8SYBASE. If you are located outside of North America, you can find
the contact information for your local Sybase Support Center by going to the
Sybase home page at http://www.sybase.com, clicking on the "Support" link at
the top of the page, and then choosing "Support Centers" from the left hand
frame.
You can always report a bug for free by visiting CaseXpress at
http://casexpress.sybase.com/cx/cx.stm. When submitting calls through
CaseXpress, please make sure to give an accurate description of the steps
you take to reproduce the bug, and include any files that may be needed
(database, source code) to reproduce the problem.
"Erik Huisman" <spam@spam.com> wrote in message
news:425e7833$1@foru
ms-1-dub...
> Andrei,
>
> I also found out (see message) that adOpenForwardOnly solves the problem.
> The problem is easy to reproduce (on a local machine also running the
> engine), using a 9.0.1 engine running it works ok, start a 9.0.2 engine on
> the same machine, the problem occurs.
>
> Thanks, for your reply.
>
> Erik
>
> "Andrei Iliev" <xzxz@mail.ru> wrote in message
> news:425e6aa7$1@foru
ms-2-dub...
>
>
|
|
|
|
|