powered by simpleCommunicator - 2.0.51     © 2025 Programmizd 02
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Получение кол-ва записей в запросе на обновление
4 сообщений из 4, страница 1 из 1
Получение кол-ва записей в запросе на обновление
    #32060070
Pestov
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Господа! Есть вопрос.
Из кода на VB вызывается метод Execute на выполнение запроса на обновление. При выполнении запроса в Access появляется запрос на подтверждение изменений и выводится количество обновляемых записей. Требуется то же самое из кода на VB. Вопрос:
Как получить кол-во обновляемых записей?
Можно ли узнать запись, которую обновить не удалось?
Заранее всем спасибо!
...
Рейтинг: 0 / 0
Получение кол-ва записей в запросе на обновление
    #32060140
Фотография mahoune
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Из кода VB ты сможешь узнать RowsAffected, тоесть кол-во строк, которое были изменены! А вот какие - это тайна и помоему для любой БД! Только если ручками по одной записи! Или предварительно делать снимок таблицы - вносить изменения - сравнить со снимком!
...
Рейтинг: 0 / 0
Получение кол-ва записей в запросе на обновление
    #32060145
BAlex
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Execute Method (ADO Connection)


Executes the specified query, SQL statement, stored procedure, or provider-specific text.

Syntax

For a non–row-returning command string:

Код: plaintext
connection.Execute CommandText, RecordsAffected, Options 


For a row-returning command string:

Код: plaintext
Set recordset = connection.Execute (CommandText, RecordsAffected, Options)


Return Value

Returns a Recordset object reference.

Parameters

CommandText A String value that contains the SQL statement, table name, stored procedure, a URL, or provider-specific text to execute.

RecordsAffected Optional. A Long variable to which the provider returns the number of records that the operation affected. Количество обработанных записей. А какие ИМЕННО записи обработаны или необработаны - Access не подскажет.
Options Optional. A Long value that indicates how the provider should evaluate the CommandText argument. Can be one or more CommandTypeEnum or ExecuteOptionEnum values.

Remarks

Using the Execute method on a Connection object executes whatever query you pass to the method in the CommandText argument on the specified connection. If the CommandText argument specifies a row-returning query, any results that the execution generates are stored in a new Recordset object. If the command is not a row-returning query, the provider returns a closed Recordset object.

The returned Recordset object is always a read-only, forward-only cursor. If you need a Recordset object with more functionality, first create a Recordset object with the desired property settings, then use the Recordset object's Open method to execute the query and return the desired cursor type.

The contents of the CommandText argument are specific to the provider and can be standard SQL syntax or any special command format that the provider supports.

An ExecuteComplete event will be issued when this operation concludes.
...
Рейтинг: 0 / 0
Получение кол-ва записей в запросе на обновление
    #32060407
Pestov
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Спасибо большое! Теперь хоть знаю откуда и куда ветер дует... в смысле где копать... :-)
...
Рейтинг: 0 / 0
4 сообщений из 4, страница 1 из 1
Форумы / Microsoft Access [игнор отключен] [закрыт для гостей] / Получение кол-ва записей в запросе на обновление
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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