powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / C++ [игнор отключен] [закрыт для гостей] / "Recordset is read-only" - такая ругань при попытке Insert/Delete строку в БД.
4 сообщений из 4, страница 1 из 1
"Recordset is read-only" - такая ругань при попытке Insert/Delete строку в БД.
    #32845178
pelena
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Горит, помогите плиз!!!!! "Recordset is read-only" - такая ругань при попытке Insert/Delete строку в БД. Подскажите, где искать этот флажок read-only в Recordsete. Каркас проекта создавался Мастером в Visual C++.Net . Подсоединяюсь к SQL серверу
CString CTestSet::GetDefaultConnect()
{
return _T("DSN=DataSourceTest;APP=Microsoft\x00ae Visual Studio .NET;WSID=AAA-5RHDC48GY3I;Trusted_Connection=Yes");
}
Не сочтите за труд черкнуть пару строк...
...
Рейтинг: 0 / 0
"Recordset is read-only" - такая ругань при попытке Insert/Delete строку в БД.
    #32845610
SiebenteWerk
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Нууу... (в-нулевых, я, блин, так скоро всё, нафиг, забуду...)
Во-первых, надо посмотреть в самой базе свойства таблицы.

Во-вторых, что скорее всего, в свойствах коннекта... (типа у _ConnectionPtr, словами ADO) или непосредственно в параметрах запроса...


msdnExecuteOptionEnum
Specifies how a provider should execute a command.


Constant Value Description
adAsyncExecute
0x10
Indicates that the command should execute asynchronously.
This value cannot be combined with the CommandTypeEnum value adCmdTableDirect.

adAsyncFetch
0x20
Indicates that the remaining rows after the initial quantity specified in the CacheSize property should be retrieved asynchronously.

adAsyncFetchNonBlocking
0x40
Indicates that the main thread never blocks while retrieving. If the requested row has not been retrieved, the current row automatically moves to the end of the file.
If you open a Recordset from a Stream containing a persistently stored Recordset, adAsyncFetchNonBlocking will not have an effect; the operation will be synchronous and blocking.

adAsynchFetchNonBlocking has no effect when the adCmdTableDirect option is used to open the Recordset.

adExecuteNoRecords
0x80
Indicates that the command text is a command or stored procedure that does not return rows (for example, a command that only inserts data). If any rows are retrieved, they are discarded and not returned.
adExecuteNoRecords can only be passed as an optional parameter to the Command or Connection Execute method.

adExecuteStream
0x400
Indicates that the results of a command execution should be returned as a stream.
adExecuteStream can only be passed as an optional parameter to the Command Execute method.

adExecuteRecord Indicates that the CommandText is a command or stored procedure that returns a single row which should be returned as a Record object.
adOptionUnspecified
-1
Indicates that the command is unspecified.
...
Рейтинг: 0 / 0
"Recordset is read-only" - такая ругань при попытке Insert/Delete строку в БД.
    #32845621
Sie
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Sie
Гость
Я ж говорил, что нагоню....

моды конекта:

msdn ConnectModeEnum
Specifies the available permissions for modifying data in a Connection, opening a Record, or specifying values for the Mode property of the Record and Stream objects.


Constant Value Description
adModeRead 1 Indicates read-only permissions.
adModeReadWrite 3 Indicates read/write permissions.
adModeRecursive 0x400000 Used in conjunction with the other *ShareDeny* values (adModeShareDenyNone, adModeShareDenyWrite, or adModeShareDenyRead) to propagate sharing restrictions to all sub-records of the current Record. It has no affect if the Record does not have any children. A run-time error is generated if it is used with adModeShareDenyNone only. However, it can be used with adModeShareDenyNone when combined with other values. For example, you can use "adModeRead Or adModeShareDenyNone Or adModeRecursive".
adModeShareDenyNone 16 Allows others to open a connection with any permissions. Neither read nor write access can be denied to others.
adModeShareDenyRead 4 Prevents others from opening a connection with read permissions.
adModeShareDenyWrite 8 Prevents others from opening a connection with write permissions.
adModeShareExclusive 12 Prevents others from opening a connection.
adModeUnknown 0 Default. Indicates that the permissions have not yet been set or cannot be determined.
adModeWrite 2 Indicates write-only permissions.
...
Рейтинг: 0 / 0
"Recordset is read-only" - такая ругань при попытке Insert/Delete строку в БД.
    #32845800
pelena
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Спасибо, что откликнулись!
1) С таблицами в базе все ОК.
2) Свойства коннекта.
("DSN=DataSourceTest;APP=Microsoft\x00ae Visual Studio .NET;WSID=AAA-5RHDC48GY3I;Trusted_Connection=Yes");
По умолчанию - не read only, можно специально указать - только для чтения, но мне это не нужно, поэтому не указываю.
Про моды коннекта ничего не понятно: где они указываются и как?
Хоть бы ма-а-а-аленький примерчик...
C Recordset тоже не все ясно: попадались на глаза описания битовых масок, где есть и read-only. Но как и где их применять не понятно...
...
Рейтинг: 0 / 0
4 сообщений из 4, страница 1 из 1
Форумы / C++ [игнор отключен] [закрыт для гостей] / "Recordset is read-only" - такая ругань при попытке Insert/Delete строку в БД.
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


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