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

1. Client电脑与SQL服务器(SQL server的内码)应保持同一内码。
2. ADOConnection连接字串中请将Auto Translate 设置成False.
3. 详细检查出错TField的类型(TStringField,TFloatInteger),与后台表中的类型是否
   一致。

帮助文档资料如下:

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

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

你可能感兴趣的:(Delphi)