Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / опять Recordset / 3 сообщений из 3, страница 1 из 1
08.06.2003, 19:51
    #32179155
вадя
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
опять Recordset
почему может не вызываться FetchComplete ?
при открытии формы :
для подформы (ххх)
Set sdf = New ADODB.Recordset
sdf.Open "N02", CurrentProject.AccessConnection, adOpenStatic, adLockOptimistic, adCmdStoredProc
Set Me("хххх").Form.Recordset = sdf

----
добавляю запись

rst.AddNew
rst.Update

обновляю подформу
Me("ххх").Form.Requery
rst.Movelast
не хочет переходить на последнююя запись

если сделать так
Set df = New ADODB.Recordset
Set df = Me("ххх").Form.RecordsetClone
df.MoveLast
sss = df.Bookmark
df.Close
Set df = Nothing
Me("ххх").Form.Bookmark = sss
Me("ххх").SetFocus

переходит только на 50 запись, а в форме >100
Forms![набор товара основа]![набор товара].Form![мм] = Null

при этом FetchComplete не вызывается.
как дождаться загрузки всех записей?
...
Рейтинг: 0 / 0
09.06.2003, 09:05
    #32179244
Senin Viktor
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
опять Recordset
из HOWTO: Use the ADO FetchProgress and FetchComplete Events.Q262311

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
- The FetchProgress and FetchComplete events only work properly in MDAC  2 . 5  or later
-Coding Requirements
When you open the recordset, you must specify adAsyncFetch as a Recordset 
Option.
You must use client-side cursors, because the FetchProgress and FetchComplete 
events are returned by the ActiveX Data Objects (ADO) client cursor engine.
In Visual Basic, you must declare the Recordset at module level using Dim with the 
WithEvents keyword
-There are two recordset properties that affect the asynchronous behavior of 
ADO. These properties should be set prior to opening the recordset. 
Initial Fetch Size determines how many records are fetched synchronously before 
the asynchronous thread is created. This allows for a small recordset to be 
created without the additional overhead of creating a thread. This is set to  50  by 
default. To guarantee that FetchProgress and FetchComplete are called, set this 
value to  0 .
Background Fetch Size determines how many records are fetched between calls to 
the FetchProgress event. This is set to  15  by default. 



из PRB: ADO Recordset Open Method May Behave Synchronously Even if adAsyncFetch is Specified.Q224332
Код: plaintext
1.
2.
3.
4.
5.
SYMPTOMS
 -The FetchComplete event is never raised.
RESOLUTION
 -If you are using a dual processor you then also need to set the  "Background 
Fetch Size"  to a low value such as  1 . 
...
Рейтинг: 0 / 0
09.06.2003, 18:13
    #32179904
Ой Вэй
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
опять Recordset
Попробуй явно задать сортировку (ORDER BY).
...
Рейтинг: 0 / 0
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / опять Recordset / 3 сообщений из 3, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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