Edit Method

原创 2005年05月19日 09:20:00

Copies the current record from an updatable Recordset object to the copy buffer for subsequent editing.



The recordset placeholder represents an open, updatable Recordset object that contains the record you want to edit.


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.

Struts2.5动态方法调用 错误Messages:This method: edit for action product is not allowed!解决方法

报错信息如下: Struts Problem Report Struts has detected an unhandled exception: Messages: Th...
  • zp1318
  • zp1318
  • 2016年06月03日 19:03
  • 3105

APS.NET_MVC5学习笔记-验证编辑方法(Edit method)和编辑视图(Edit view)

在本节中,您将验证电影控制器生成的编辑方法(Edit action methods)和视图。但是首先将修改点代码,使得发布日期属性(ReleaseDate)看上去更好。打开Models \ Movie...

ASP.NET MVC 5 - 验证编辑方法(Edit method)和编辑视图(Edit view)

在本节中,您将验证电影控制器生成的编辑在接下来的教程中,我们将讨论DataAnnotations。Display属性指明要显示的字段的名称(在本例中“Release Date”来代替“ReleaseD...

Windows edit控件(编辑框控件)

在C语言控制台程序(Console Application)中,可以使用 scanf 函数获取用户的输入,而在Windows程序中使用编辑框控件。 创建编辑框控件 编辑框控件的窗口类名是edi...
  • softn
  • softn
  • 2016年06月20日 06:40
  • 1374


例如对windows发消息让文本选中。 SendMessage(Text1.hwnd,EM_GETSEL,0,-1 ); EC_LEFTMARGIN(&H1) EC_USEFONTINF /...



汇编语言 文本文件编辑器(简单的EDIT)

源代码下载 http://pan.baidu.com/s/1qYa3L04一、 问题描述用汇编语言实现一个文本文件编辑器(简单的EDIT),实验要实现打开、保存、编辑。二、数据结构为了处理文本信息的读...
  • Shuphen
  • Shuphen
  • 2017年07月14日 10:30
  • 542

MFC->Edit Control控件基本使用

介绍使用Edit Control控件进行基本的输入和显示,其他功能有待补充。使用MFC应用程序开发流程: 1.创建基于对话框的应用程序框架(修改对话框属性) 2.给对话框添加控件(设置唯一ID) 3....
  • xAston
  • xAston
  • 2016年03月16日 00:32
  • 2549


MFC中Edit用法整理 众所周知,现在微软出台的编译器已经很多了,如vc++6.0,vs2005,vs2008,vs2010等,虽然变化多样,但是万变不离其根本,最根本用法没有多大变化。打开你所安...


1.新建一个编辑框控件(Edit Control),将其多行(Multiline)前面打勾(属性设置为True),Auto HScroll(自动水平滚动)前面的勾去掉(属性设置False),这样就可以...
您举报文章:Edit Method