Edit Method

千与千寻信仰

千与千寻信仰

2016-01-29 12:39

Edit Method,Edit Method

Copies the current record from an updatable Recordset object to the copy buffer for subsequent editing.
Syntax
recordset.Edit
The recordset placeholder represents an open, updatable Recordset object that contains the record you want to edit.
Remarks
Once you use the Edit method, changes made to the current record's fields are copied to the copy buffer. After you make the desired changes to the record, use the Update method to save your changes.
The current record remains current after you use Edit.
Caution If you edit a record and then perform any operation that moves to another record, but without first using Update, your changes are lost without warning. In addition, if you close recordset or end the procedure which declares the Recordset or the parent Database or Connection object, your edited record is discarded without warning.
Using Edit produces an error if:

?There is no current record.?The Connection, Database, or Recordset object was opened as read-only.?No fields in the record are updatable.?The Database or Recordset was opened for exclusive use by another user (Microsoft Jet workspace).?Another user has locked the page containing your record (Microsoft Jet workspace).
In a Microsoft Jet workspace, when the Recordset object's LockEdits property setting is True (pessimistically locked) in a multiuser environment, the record remains locked from the time Edit is used until the update is complete. If the LockEdits property setting is False (optimistically locked), the record is locked and compared with the pre-edited record just before it's updated in the database. If the record has changed since you used the Edit method, the Update operation fails with a run-time error if you use OpenRecordset without specifying dbSeeChanges. By default, Microsoft Jet-connected ODBC and installable ISAM databases always use optimistic locking.
In an ODBCDirect workspace, once you edit (and use Update to update) a record抯 primary key field, you can no longer edit fields in that record until you close the Recordset, and then retrieve the record again in a subsequent query.
Note To add, edit, or delete a record, there must be a unique index on the record in the underlying data source. If not, a "Permission denied" error will occur on the AddNew, Delete, or Edit method call in a Microsoft Jet workspace, or an "Invalid argument" error will occur on the Update call in an ODBCDirect workspace.
展开更多 50%)
分享

猜你喜欢

Edit Method

电脑网络
Edit Method

Edit Method Example

电脑网络
Edit Method Example

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

In Javascript Class, how to call the prototype method.(three method)

Web开发
In Javascript Class, how to call the prototype method.(three method)

Edit Box

编程语言 网络编程
Edit Box

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

AddNew Method Example

电脑网络
AddNew Method Example

use Assembly to call a method

电脑网络
use Assembly to call a method

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

Thinking in C#

Thinking in C#

怎样得到一个系统盘的全名 不是字符 是全名 如:本地磁盘(C:)?

怎样得到一个系统盘的全名 不是字符 是全名 如:本地磁盘(C:)?
下拉加载更多内容 ↓