为什么当我把adodataset的cursortype属性设为ctkeyset时,再把active设为true时,它会自动改为ctstatic.为什么,我应该怎么设?
解决方案 »
- 请问EhLib 6.1 有Full Source版本吗?
- 100
- 救命啊,折磨我好几天了,谁帮我解决这个问题送分到满意为止
- 如何将clx组件下的程序变成vCL?
- 怎样让一个可执行文件有多个可用的图标
- 这个查询的SQL语句如何,ACCESS2000数据库,内详
- d7开发websnap应用好像稳定性不好,请大家谈谈.
- 我关联了exe文件,如何在使我的程序运行后,在运行这个程序???
- 请问,WIN32组件中的TREEVIEW怎么用?我想做成象本版面左边一样,点一个ITEM,如果下面还有ITEM就展开,没有就显示相应的东西。添加ITEM
- form之间参数传递问题!
- 谁知道去那可以下载到一些BITBTN,BUTTON,TOOLBAR等用的图标??
- 请问哪里有installshield express for delphi(full edition)下载,高分相送!!!
看见这么一条:
Only ctStatic is supported if the CursorLocation property of the ADO dataset component is set to clUseClient.相信应该知道原因了吧~
我用adodataset连接access数据库,如果把corsorlocation设置成为了cluseserver
那个cursortype就不会自动改变了~
但是如果是 cluseclient就会出现你说的那种情况~如果你那样不可以,肯定是你的数据库不支持这种corsortype了~也就是我给你看的第二条的原因了~
1."ctUnspecified" A specific cursor type has not yet been specified.
2."ctOpenForwardOnly" Forward-only cursor in which you can only scroll forward; better performance because only requires single through recordset.
3."ctKeyset" Keyset cursor; records added by other users are not visible; records deleted by other users are inaccessible.
4."ctDynamic" Dynamic cursor; data modifications, deletions, and insertions by other users are visible; scrolling forward and back allowed.
5."ctStatic" Static cursor; static copy of records; data changes by other users not visible; used mostly for reporting.可以看出,实际上ctKeyset不能满足你的需要,ctDynamic才行,我试的时候当把adodataset.active设置成true的时候这个值也正好被自动设置成了ctDynamic(注意此时的cursorLocation必须是cluseserver)。