关于“Grid index out of range”的问题
1)所用控件
TDBGrid *DBGrid1;
TDBNavigator *DBNavigator1;
TDataSource *DSSQL;
TQuery* Query1;
2)控年设置
DSSQL->DataSet = Query1;
DBNavigator1->DataSource = DSSQL;
DBGrid1->DataSource = DSSQL;
3)出错的情况
3-1) 第一次执行
{
Query1->Close();
Query1->SQL->Clear();
Query1->SQL->Add("select * from aa where qs<"04018");
Query1->Open():
}
然后点击DBNavigator1控件的“Last”按钮,程序正常
3-2)第二次执行
{
Query1->Close();
Query1->SQL->Clear();
Query1->SQL->Add("select * from aa where qs<"04016");
Query1->Open():
}
然后点击DBNavigator1控件的“Last”按钮,程序报“Grid index out of range”错. 点警告框的“确定”按钮后,进入C++Builder的调试状态,不作任何变动,直接
“RUN”按钮,回到程序运行状态,再按DBNavigator1控件的“Last”按钮,程序又正常。
以后每再次重新用SQL查询后,想到数据集的最后一条记录(用语句Query1->Last();也一样),非要出次错,才会正常,不知是何道理,不知有何对策,我估计是DBGrid1的设置有误,但不知具体原因。
请赐教,
为感!!
相关推荐
CGridCtrl的InsertColumn函数数组越界中断异常解决办法.rar
MFC的表格框架CGrdCtrl对表格插入一列时调用 CGridCtrl::InsertColumn出现 vector subscript out of range数组越界异常的解决办法。
ArcMap工具及疑难解决办法
ARCMAP软件中的每个工具的详细介绍以及一些相关疑难问题的解决办法。
Dundas.Chart.for.Winform.Enterprise.v7.1.0.1812.for.VS2008
Add advanced charting to your ASP.NET applications. Dundas Chart ASP.NET Enterprise Edition is a fully managed, CLR (Common Language Runtime) compliant charting component designed for ASP.NET development. Included is support for all standard and many advanced chart types, drilldown functionality, full Visual Studio Integrated help, a variety of different image formats and intuitive samples and examples to speed up development time. Graphics take full advantage of GDI+ and the use of transparency, anti-aliasing, gradients and more. Dundas Chart for ASP.NET Enterprise Edition includes many advanced features including: formula support, data grouping, data filtering and advanced chart types. Dundas Chart for .NET is the industry leader in .NET Charting Solutions. Providing you with the most comprehensive features, the most complete sample framework, and the best live technical support available. From start to finish, our team is dedicated to providing what you need to make your project successful. Whether you are implementing charting into internal projects, or building applications for clients, Dundas Chart offers advanced, award-winning technology and advanced results to get the most out of data What’s new in Dundas Chart for ASP.NET? Now supports Visual Studio 2010 What’s new in Dundas Chart V7.1? - V7.1 fixes these issues: AlwaysRecreateHotregions="True" in WinForms templates or templates generated by Chart Builder causes the Exception Can't deserialize property. Unknown property name "AlwaysRecreateHotregions" in object Dundas.Charting.WebControl.Chart" when de-serialized in ASP.NET Chart. This property only exists in the WinForms Chart. The ASP.NET Chart ignores this property by default now. Chart .NET: Stacked Column + 3D throws an Index was out of range exception when series have a different number of data points The accumulation distribution formula is incorrect; if open and close are the same it will divide by zero. A friendlier exception message is th
UCINET.pptx
UCINET入门介绍
DevExpress VCL 12.2.6(v2012vol2.6) 源码-例子-帮助-part1
================================== ==注意:一共2个压缩包,这是第1个== ================================== *提示:无自动安装程序,包含所有源码、例子、帮助,请按照安装顺序安装!!! DevExpress VCL v2012 vol 2.6 包含所有源码、例子、帮助 如果你安装过其它版本的DevExpressVCL,安装前请完全卸载老版本的Dev控件,并执行“清理Dev残余文件”,清理System32下的DevExpress的BPL文件。 What's New in DevExpress VCL 12.2.6 Release Notes Feature Highlights To learn about feature highlights in this version, please refer to the following page: New Features - DevExpress VCL 12.2.6 Known Issues To learn about known issues in this version, please refer to the following page: Known Issues - DevExpress VCL 12.2.6 The following sections list all minor and major changes in DevExpress VCL 12.2.6. Note that products, controls and libraries which aren't mentioned in the list below are included in the unified installer for compatibility, but have not been updated. New Features/Changes ExpressQuantumTreeList Suite Q484199 - Documentation - Provide an example of how to use the TcxCustomTreeList.Find function Resolved Issues VCL Subscription B232998 - Documentation - The OnValidateDrawValue event is not described ExpressBars Suite Q492229 - Activating an MDI child window always repaints it, regardless of the bar manager's AlwaysMerge property value Q490246 - Changing a bar item's Visible property when a form is being destroyed results in an AV Q489146 - Ribbon - A Ribbon tab group's Caption property does not apply to the group caption if this group is displayed in a popup window Q489457 - Ribbon - TdxRibbonBackstageView - In RAD Studio XE or later, an AV occurs when changing the parent of a currently hidden form with the BackstageView after the form Position property has been set to poDesigned and the toolbar on this form made visible Q486834 - Ribbon - TdxRibbonBackstageView - Invoking the BackstageView does not move focus to it from the currently focused control that resides on a form with this BackstageView B233045 - Ribbon - TdxRibbonBackstageView - Right-clicking an empty spa


