“多步操作产生错误,请检查每一步的状态”的解决方案

需检查是否是以下这些情况:

1.无主键

2.字段允许为空

3.字段类型不匹配

4.ADO控件 CursorLocation的属性,默认值为“clUseClient”,应设为“clUseServer”。

帮助文档资料如下:

Use CursorLocation to indicate whether the cursors that use the connection object to connect to the ADO datastore use a client-side or server-side cursor library. CursorLocation only affects connections opened after the property is set. The default value for CursorLocation is clUseClient.

A client-side cursor offers more flexibility. All data is retrieved to the local machine and then operated on there, allowing operations not normally supported by servers like sorting and resorting the data and additional filtering. SQL statements are executed at the server, so for statements that restrict the result set with a WHERE clause, only the reduced result set is retrieved to a local cursor.

A server-side cursor offers less flexibility, but may be more advantageous (or necessary) for large result sets. Using a server-side cursor becomes necessary when the sheer size of a result set exceeds the available disk space that would be needed to create the client-side cursor. Also, many servers only support unidirectional cursors. This would preclude moving the record pointer in the dataset backward (even one record) through the result set.

简单翻译一下:

CursorLocation 是用来确认数据库连接对象是使用服务端还是客户端游标库的属性,默认值为clUseClient。

客户端光标提供更多的灵活性,所有的数据是下载到本地后再进行操作,允许进行一些服务端不允许的操作,如排序、重置和过滤等等。SQL语句本身是在服务端执行,并且只返回WHERE子句限制下的结果集。

服务端光标的灵活性较差,但是比较利于执行大数据量的操作。但如果返回的结果集超过了设定的磁盘缓冲空间就必须使用客户端光标了。而且很多数据库服务器只支持单向游标,这就意味着,你只能从头到尾遍历一次数据集(即使是一条记录)。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值