• 多步操作产生错误,请检查每一步的状态值


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

    1.无主键

    2.字段允许为空

    3.字段类型不匹配

    4.字段是不是精度不够。

    5.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子句限制下的结果集。

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

    来源:http://www.cnblogs.com/chinahbzm/articles/1268357.html

  • 相关阅读:
    django虚拟环境中报E: 无法定位软件包 sqliteman
    创建django项目
    Django虚拟环境安装
    python学习笔记(三)
    python学习笔记(二)
    python学习笔记(一)
    python 类属性和实例属性
    决策树的基本ID3算法
    KNN算法的简单实现
    webClient
  • 原文地址:https://www.cnblogs.com/railgunman/p/1978497.html
Copyright © 2020-2023  润新知