Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Почему TQuery->RecordCount работает невсегда / 4 сообщений из 4, страница 1 из 1
16.11.2002, 12:46:14
    #32068620
folow men
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Почему TQuery->RecordCount работает невсегда
Когда простой запрос шлеш
RecordCount не врет ,но если посложнее то хоть убейте -1
В чем дело
...
Рейтинг: 0 / 0
16.11.2002, 12:47:36
    #32068622
MiCe
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Почему TQuery->RecordCount работает невсегда
а курсор не серверный случайно?....
fetchAll не поможет?
...
Рейтинг: 0 / 0
18.11.2002, 08:55:04
    #32068799
Случайный прохожий
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Почему TQuery->RecordCount работает невсегда
У меня тоже такое было.
По моему помогает TQuery.Last.
После того как встал на последнюю запись RecordCount возвращает правильное количество записей
...
Рейтинг: 0 / 0
18.11.2002, 09:57:05
    #32068818
MarchCat
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Почему TQuery->RecordCount работает невсегда
Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
MDAC  2 . 5  SDK - ADO


 

RecordCount Property
      

Indicates the number of records in a Recordset object.

Return Value

Returns a Long value that indicates the number of records in the Recordset.

Remarks

Use the RecordCount property to find out how many records are in a Recordset object. The property returns - 1  when ADO cannot determine the number of records or if the provider or cursor type does not support RecordCount. Reading the RecordCount property on a closed Recordset causes an error.

If the Recordset object supports approximate positioning or bookmarks—that is, Supports (adApproxPosition) or Supports (adBookmark), respectively, return True—this value will be the exact number of records in the Recordset, regardless of whether it has been fully populated. If the Recordset object does not support approximate positioning, this property may be a significant drain on resources because all records will have to be retrieved and counted to return an accurate RecordCount value.

The cursor type of the Recordset object affects whether the number of records can be determined. The RecordCount property will return - 1  for a forward-only cursor; the actual count for a static or keyset cursor; and either - 1  or the actual count for a dynamic cursor, depending on the data source.
...
Рейтинг: 0 / 0
Форумы / Microsoft SQL Server [игнор отключен] [закрыт для гостей] / Почему TQuery->RecordCount работает невсегда / 4 сообщений из 4, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]