|
|
|
BUG при доступе к SA 11.0 (ASA 11.0) через ADO DB
|
|||
|---|---|---|---|
|
#18+
Обнаружил вот такую засаду при использовании Microsoft OLE DB Provider for ODBC. При select'е из любой таблицы по первичному ключу, если тип курсора не adOpenForwardOnly - возвращается не одна запись, а 2. Проверить просто, ниже VBS скрипт, в котором выполняется SELECT * FROM GROUPO.Products where id=300 из демо базы "SQL Anywhere 11 Demo", которая ставится Sybase'ом. Должна вернуться одна строка, а возвращается 2. Проверял на 2-х разных машинах - везде такая вот лажа. Кто нибудь это тоже наблюдает? Run: script test.vbs =========test.vbs======================= Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 Const adLockReadOnly = 1 sSql="SELECT * FROM GROUPO.Products where id=300" Dim oConn Dim oRS set oConn= CreateObject("ADODB.Connection") oConn.Open "SQL Anywhere 11 Demo" WScript.Echo sSql Set oRs = CreateObject("ADODB.RecordSet") oRs.Open sSQL, oConn, adOpenStatic, adLockReadOnly Do while not oRs.Eof WScript.Echo "id='" & oRs.Fields.Item("id").value & "'" oRs.MoveNext Loop ============================================== ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 14.10.2008, 18:03 |
|
||
|
BUG при доступе к SA 11.0 (ASA 11.0) через ADO DB
|
|||
|---|---|---|---|
|
#18+
Сегодня в Sybase подтвердили (news://forums.sybase.com:119/48f7a4b8$1@forums-1-dub) существование этой проблемы: ============================================ I see your repro is failing the way you describe and I will be notifying engineering of this. The problem does not occur when opening the result set using either adOpenForwardOnly or adOpenDynamic. So either one may be used as the workaround for now. It definitely occurs with adOpenKeyset or adOpenStatic. It appears that the first call to SQLFetchScroll( ) using bookmarks is refetching the results from the current cursor position. The other two cursor types do not use bookmarks and they are not exposed to this problem. ============================================ ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 17.10.2008, 14:27 |
|
||
|
|

start [/forum/topic.php?fid=55&fpage=45&tid=2011325]: |
0ms |
get settings: |
11ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
46ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
34ms |
get tp. blocked users: |
2ms |
| others: | 239ms |
| total: | 368ms |

| 0 / 0 |

Извините, этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
... ля, ля, ля ...