让DBGRID实时更新数据,用的是BDE+MODULE

xiaozoujia 2003-06-27 04:51:00
我的窗体中只有一个DATA SOURCE和一个DBGRID,DATASOURCE调用的TABLE放在MODULE里面
我用了一下方法。
dbgrid1.DataSource.DataSet.Active:=False;
dbgrid1.DataSource.DataSet.Active:=True;

第一次出错提示操作不可用,关闭退出后,再进一次就正常,这个是为什么
有什么别的方法吗
...全文
25 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaozoujia 2003-06-30
  • 打赏
  • 举报
回复
还是不行啊,出错提示operation not opplicable,试过关掉一部分的程序,但是好象结果一样,没有和他发生冲突.
就是奇怪啊,出错后退出这个窗口,重进也可以进出,但是最后一个进去的记录显示不出来.

整个程序退出后,重进,记录在.
dgdlking 2003-06-30
  • 打赏
  • 举报
回复
还是改用ADO吧

dbgrid1.DataSource.DataSet.Active:=False;
dbgrid1.DataSource.DataSet.Active:=True;

或者用close ,open
risingsoft 2003-06-27
  • 打赏
  • 举报
回复
dbgrid1.DataSource.DataSet.TableName看一下是什么
还有 设计期间不要把表的Active设置为TRUE
xiaozoujia 2003-06-27
  • 打赏
  • 举报
回复
这个也用了,但是不行
payzq 2003-06-27
  • 打赏
  • 举报
回复
try
except
end;
xiaozoujia 2003-06-27
  • 打赏
  • 举报
回复
忘了说了,断点在
dbgrid1.DataSource.DataSet.Active:=True;

出错
things 2003-06-27
  • 打赏
  • 举报
回复
在设计器打开DataSet
wangl 2003-06-27
  • 打赏
  • 举报
回复
你可以设断点,跟踪以下,很可能是你代码的问题。
Unofficial version Rx library for Delphi 2005/2006/2007/2009/2010/XE/XE2/XE3 DISCLAIMER: * This software is provided "as is" and is without warranty of any kind. The author(s) of this software does not warrant, guarantee or make any representations regarding the use or results of use of this software in terms of reliability, accuracy or fitness for purpose. You assume the entire risk of direct or indirect, consequential or inconsequential results from the correct or incorrect usage of this software even if the author(s) has been informed of the possibilities of such damage. Neither the author(s) nor anybody connected to this software in any way can assume any responsibility. * All rights held by the author(s) or owner(s) of units or documents. _______________________________________________________________________________ Update 1.10 1/ Update for Delphi XE3 _______________________________________________________________________________ Update 1.09 1/ Delphi package source actualization 2/ Delphi 6 conditional corections 3/ TRxFindFiles support class added 4/ Corrections for default (ENG) lang. resource _______________________________________________________________________________ Update 1.08 1/ file case name unit corrections. 2/ only one language file can be used in your applications like: a) in Rx.inc activate {$DEFINE _LNG_ONE_}. b) activate yours own language in new include RxLangDef.inc like {$DEFINE RXLANG_Cze}. note: Languages different from English locates in utf-8 files, may be editor problem for lower version Delphi than 2005. c) in your project use global conditional define like RXLANG_MYLANG (it activate your lang file only). d) rebuild your application, it will be smaller with one your language mutation for RxLibrary only. 3/ repair malfunction of TColor property (big thanks to Remy Lebeau). 4/ many new constant color names added into module RxColors (+ 229 named constant). 5/ new component TRxThread added for better access. 6/ repair malfunction of property caption editor. 7/ new components TRxAnimBitBtn, TRxAnimSpeedButton added. 8/ repair malfunction with styles in TRxProgress. 9/ refresh code in TRxDBGridSorter. 10/ adopted 20 function utilities by Alexey Popov into module RxProps. 11/ activate Align property in TRxSpinButton. 12/ rename parameter Name to AName in define event TExecOpenDialogEvent, because occur names conflict. 13/ repair conflict in string property in module RxTranslate for unicodes. 14/ some functions added into module RxVerInf for better work with versions. Note for users Delphi 5/6/7: ---------------------------- RxLibrary is not directly designed for this Delphi versions. When you will want compile source code in this versions of Delphi, you have to open all units contain form (*.dfm) and resave it for resource compatibility (crash prevent IDE) before rebuild and install into IDE. Some functionality will be lost. Note for users Delphi XE2 (64 bit.ver): --------------------------------------- This source code is 64 bit ready but untested. BDE packs must be removed from 64 bit project as unsuported technology. Note for users CBuilder: ------------------------ This source code is CBuilder (2006/2007) ready but uncomplete and untested yet. Releases February 29, 2012 _______________________________________________________________________________ Update 1.07 1/ Update all packages in unit scope. 2/ Change namespace in RxViewer unit for XE2. _______________________________________________________________________________ Update 1.06 1/ repair malfunction of TFormStorage under Unicode Delphi. 2/ update packages file for Delphi 2005 - XE. 3/ update package for Delphi XE2 32 bit. _______________________________________________________________________________ Update 1.05 1/ better compatibility with Delphi 2009. 2/ new adopted component for view any supported files. 3/ convert dfm files to text. _______________________________________________________________________________ Update 1.04 Updated: 1/ small mistake in RxDBCtrl.pas (wrong show DBGrid). 2/ activate tables in general RxDemo. 3/ replacement deprecated FileAge() in RxFileUtils. _______________________________________________________________________________ The initial release(s) no included
for Delphi 2005/2006/2007/2009/2010/XE/XE2/XE3 DISCLAIMER: * This software is provided "as is" and is without warranty of any kind. The author(s) of this software does not warrant, guarantee or make any representations regarding the use or results of use of this software in terms of reliability, accuracy or fitness for purpose. You assume the entire risk of direct or indirect, consequential or inconsequential results from the correct or incorrect usage of this software even if the author(s) has been informed of the possibilities of such damage. Neither the author(s) nor anybody connected to this software in any way can assume any responsibility. * All rights held by the author(s) or owner(s) of units or documents. _______________________________________________________________________________ Update 1.10 1/ Update for Delphi XE3 _______________________________________________________________________________ Update 1.09 1/ Delphi package source actualization 2/ Delphi 6 conditional corections 3/ TRxFindFiles support class added 4/ Corrections for default (ENG) lang. resource _______________________________________________________________________________ Update 1.08 1/ file case name unit corrections. 2/ only one language file can be used in your applications like: a) in Rx.inc activate {$DEFINE _LNG_ONE_}. b) activate yours own language in new include RxLangDef.inc like {$DEFINE RXLANG_Cze}. note: Languages different from English locates in utf-8 files, may be editor problem for lower version Delphi than 2005. c) in your project use global conditional define like RXLANG_MYLANG (it activate your lang file only). d) rebuild your application, it will be smaller with one your language mutation for RxLibrary only. 3/ repair malfunction of TColor property (big thanks to Remy Lebeau). 4/ many new constant color names added into module RxColors (+ 229 named constant). 5/ new component TRxThread added for better access. 6/ repair malfunction of property caption editor. 7/ new components TRxAnimBitBtn, TRxAnimSpeedButton added. 8/ repair malfunction with styles in TRxProgress. 9/ refresh code in TRxDBGridSorter. 10/ adopted 20 function utilities by Alexey Popov into module RxProps. 11/ activate Align property in TRxSpinButton. 12/ rename parameter Name to AName in define event TExecOpenDialogEvent, because occur names conflict. 13/ repair conflict in string property in module RxTranslate for unicodes. 14/ some functions added into module RxVerInf for better work with versions. Note for users Delphi 5/6/7: ---------------------------- RxLibrary is not directly designed for this Delphi versions. When you will want compile source code in this versions of Delphi, you have to open all units contain form (*.dfm) and resave it for resource compatibility (crash prevent IDE) before rebuild and install into IDE. Some functionality will be lost. Note for users Delphi XE2 (64 bit.ver): --------------------------------------- This source code is 64 bit ready but untested. BDE packs must be removed from 64 bit project as unsuported technology. Note for users CBuilder: ------------------------ This source code is CBuilder (2006/2007) ready but uncomplete and untested yet. Releases February 29, 2012 _______________________________________________________________________________ Update 1.07 1/ Update all packages in unit scope. 2/ Change namespace in RxViewer unit for XE2. _______________________________________________________________________________ Update 1.06 1/ repair malfunction of TFormStorage under Unicode Delphi. 2/ update packages file for Delphi 2005 - XE. 3/ update package for Delphi XE2 32 bit. _______________________________________________________________________________ Update 1.05 1/ better compatibility with Delphi 2009. 2/ new adopted component for view any supported files. 3/ convert dfm files to text. _______________________________________________________________________________ Update 1.04 Updated: 1/ small mistake in RxDBCtrl.pas (wrong show DBGrid). 2/ activate tables in general RxDemo. 3/ replacement deprecated FileAge() in RxFileUtils. _______________________________________________________________________________ The initial release(s) no included
Unofficial version Rx library for Delphi 2005/2006/2007/2009/2010/XE/XE2/XE3/XE4/XE5/XE6 DISCLAIMER: * This software is provided "as is" and is without warranty of any kind. The author(s) of this software does not warrant, guarantee or make any representations regarding the use or results of use of this software in terms of reliability, accuracy or fitness for purpose. You assume the entire risk of direct or indirect, consequential or inconsequential results from the correct or incorrect usage of this software even if the author(s) has been informed of the possibilities of such damage. Neither the author(s) nor anybody connected to this software in any way can assume any responsibility. * All rights held by the author(s) or owner(s) of units or documents. _______________________________________________________________________________ Update 1.13 1/ Update for Delphi XE6 _______________________________________________________________________________ Update 1.12 1/ Update for Delphi XE5 2/ New component TRxPanel added _______________________________________________________________________________ Update 1.11 1/ Update for Delphi XE4 _______________________________________________________________________________ Update 1.10 1/ Update for Delphi XE3 _______________________________________________________________________________ Update 1.09 1/ Delphi package source actualization 2/ Delphi 6 conditional corections 3/ TRxFindFiles support class added 4/ Corrections for default (ENG) lang. resource _______________________________________________________________________________ Update 1.08 1/ file case name unit corrections. 2/ only one language file can be used in your applications like: a) in Rx.inc activate {$DEFINE _LNG_ONE_}. b) activate yours own language in new include RxLangDef.inc like {$DEFINE RXLANG_Cze}. note: Languages different from English locates in utf-8 files, may be editor problem for lower version Delphi than 2005. c) in your project use global conditional define like RXLANG_MYLANG (it activate your lang file only). d) rebuild your application, it will be smaller with one your language mutation for RxLibrary only. 3/ repair malfunction of TColor property (big thanks to Remy Lebeau). 4/ many new constant color names added into module RxColors (+ 229 named constant). 5/ new component TRxThread added for better access. 6/ repair malfunction of property caption editor. 7/ new components TRxAnimBitBtn, TRxAnimSpeedButton added. 8/ repair malfunction with styles in TRxProgress. 9/ refresh code in TRxDBGridSorter. 10/ adopted 20 function utilities by Alexey Popov into module RxProps. 11/ activate Align property in TRxSpinButton. 12/ rename parameter Name to AName in define event TExecOpenDialogEvent, because occur names conflict. 13/ repair conflict in string property in module RxTranslate for unicodes. 14/ some functions added into module RxVerInf for better work with versions. Note for users Delphi 5/6/7: ---------------------------- RxLibrary is not directly designed for this Delphi versions. When you will want compile source code in this versions of Delphi, you have to open all units contain form (*.dfm) and resave it for resource compatibility (crash prevent IDE) before rebuild and install into IDE. Some functionality will be lost. Note for users Delphi XE2 (64 bit.ver): --------------------------------------- This source code is 64 bit ready but untested. BDE packs must be removed from 64 bit project as unsuported technology. Note for users CBuilder: ------------------------ This source code is CBuilder (2006/2007) ready but uncomplete and untested yet. Releases February 29, 2012 _______________________________________________________________________________ Update 1.07 1/ Update all packages in unit scope. 2/ Change namespace in RxViewer unit for XE2. _______________________________________________________________________________ Update 1.06 1/ repair malfunction of TFormStorage under Unicode Delphi. 2/ update packages file for Delphi 2005 - XE. 3/ update package for Delphi XE2 32 bit. _______________________________________________________________________________ Update 1.05 1/ better compatibility with Delphi 2009. 2/ new adopted component for view any supported files. 3/ convert dfm files to text. _______________________________________________________________________________ Update 1.04 Updated: 1/ small mistake in RxDBCtrl.pas (wrong show DBGrid). 2/ activate tables in general RxDemo. 3/ replacement deprecated FileAge() in RxFileUtils. _______________________________________________________________________________ The initial release(s) no included

5,402

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧