被 listbox整瓜了???help??help???

wxh850619 2005-04-30 10:01:27
procedure TForm5.Button1Click(Sender: TObject);
var
i:integer;
begin
for i:=0 to listbox3.Count -1 do
if listbox3.Selected[i] then
begin
adoquery3.SQL.Clear ;
adoquery3.Close ;
adoquery3.Connection :=adoconnection1;
adoquery3.SQL.Add('select * from userspriv where privid="'+edit4.Text+'" and usersid="'+edit2.text+'"');
adoquery3.Open ;

if adoquery3.eof then
begin
listbox2.Items.Add(listbox3.Items[i]);
listbox3.DeleteSelected ;

adoquery3.sql.Clear ;
adoquery3.Close ;
adoquery3.Connection :=adoconnection1;
adoquery3.SQL.Add('insert into userspriv(usersid,privid,privname) values("'+edit2.text+'","'+edit4.text+'","'+edit3.text+'")');
adoquery3.ExecSQL ;
end;
if listbox3.Items.text='' then
begin
button3.Enabled :=false;
end;
end;
end;


请各位大虾帮忙为什么总是提示"list index out of bounds(2)"错误了???

在线等~~~~~~~~~~~~~~
...全文
65 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wxh850619 2005-04-30
  • 打赏
  • 举报
回复
Thank You Very Very Very VeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVery Much~~~~~~~!
wxh850619 2005-04-30
  • 打赏
  • 举报
回复
你的意思是说把for i:=0 to listbox3.Count -1 do
换成for i:=ListBox3.Count-1 downto 0 do就可以了吗?
gzmhero 2005-04-30
  • 打赏
  • 举报
回复
List项删除会造成Count改变,而循环不变,造成越界。

for i:=0 to listbox3.Count -1 do
------------->>>>>>>>>>>>>>>>>>>>>>>.
for i:=ListBox3.Count-1 downto 0 do
就OK了。
Note that Delphi IDE does not move components to the new default place on components palette when you install new version of same component(s). So if you already has EhLib installed, then installation new (3.0) version does not move EhLib components to the 'EhLib' page. To force Delphi IDE to move compontes to the default place on components palette do next: Open menu: Component->Configure Palette. Select '[All]' line in Pages listbox. Click 'Default Pages' button. 4. Installation Help ----------------- 1. This version of library doesn't have help files for Delphi8 and Delphi2005. 2. Delphi 4.x - 7.x: Copy the EhLib.hlp and EhLib.cnt files to the Delphi HELP subdirectory. Select Help|Customize to start the OpenHelp application. Add the EhLib.cnt file to the Contents page, add the EhLib.hlp file to the Index and Link pages. 3. C++Builder 4.x - 6.x: Copy the EhLib.hlp and EhLib.cnt files to the C++Builder HELP subdirectory. Select Help|Customize to start the OpenHelp application. Add the EhLib.cnt file to the Contents page, add the EhLib.hlp file to the Index and Link pages. 5. Demonstration Programs ---------------------- Demonstration programs use tables from the DEMOS directory and BDE alias "DBDEMOS". DEMOS/DEMO1 - Demonstration of use TDBGridEh, TPrintDBGridEh, TDBLookupComboboxEh and TPreviewBox. Requare EhLibBDE.Pas file from DataService directory DEMOS/DirTree - Demonstration of use TDBGridEh and TMemTableEh in tree-view mode. DEMOS/IbDemo - Demonstration of use TMemTableEh, TBDEDataDriverEh. DEMOS/MasterDetailType3 - Demonstration of master/detail relation for TMemTableEh component. DEMOS/SQLDataDriver - Demonstration of use TSQLDataDriver. DEMOS/TreeView - Demonstration of use TDBGridEh and TMemTableEh in tree-view mode
ComponentOne Studio for Windows Phone 2013 v1 Part of: Ultimate | Enterprise 20+ fully-charged Windows Phone 8 controls for data visualization, rich text editing, data input, PDF viewing, and more. Expand your toolbox and enhance your apps. ComponentOne Studio® for Windows Phone includes over 20 UI controls for data visualization, rich text editing, data input, PDF viewing, layout and more. Designed to enhance the rich user experience of the Windows Phone 8, these Silverlight controls give you powerful and unique functionality to help you build better and more compelling apps. 2013 v1 Now Available! Download the 2013 v1 update to access the new Tile controls as well as Windows Phone 8 support. See the what's new details. What's Inside? Calendar FlexGrid Chart Maps PdfViewer RichTextBox ContextMenu CoverFlow DateTimePicker Excel Gauges Imaging Input Layout Panels ListBox PDF Popup ProgressBar Tiles ToggleSwitch Zip Show Less Why use Studio for Windows Phone? Consistent Metro UI Design Consistent Metro UI Design Studio for Windows Phone supports the Metro UI design and interaction guidelines specified by Microsoft. By default, each control supports a Metro look and automatically inherits the dark or light theme set by the user. Be confident that your apps will look consistent on your users' phones. Stunning Data Visualization Stunning Data Visualization Your charting apps are just a few clicks away with Chart for Windows Phone offering over 30 chart types, user interaction, and a wide range of color palettes. Gauges for Windows Phone, with a variety of designs and shapes, give you dashboard-style visualization perfect for the mobile platform. XAML Styling Made Easy: ClearStyle Technology XAML Styling Made Easy: ClearStyle Technology ClearStyle Technology is our new paradigm to XAML control styling. ClearStyle allows developers to easily change control colors without having to modify control templates. By just setting a few brush properties in Visual Studio 2010 you can quickly give a unique look to the control without having to work in Expression Blend or hire a professional designer. Maps Powered By Esri Maps Powered By Esri ComponentOne has partnered with Esri, the leading online map and GIS provider, to bring you the best mapping tools and UI controls together in one package. Easily transform GIS data into business intelligence with controls for Windows Phone with Maps powered by Esri®. The Maps powered by Esri utilize the powerful mapping, geocoding, and geoprocessing capabilities provided by ArcGIS Server.
The initial release (v1) comes with the following features: 4 Different theme colors Responsive design Documentation HTML pages including: Dashboard with stats, charts and recent events UI elements Buttons Treeview Form elements Wysiwyg editor Wizard Customizable widgets Image gallery Pricing tables Invoice Inbox Timeline FAQ User profile Login, register and forgot password Error 404 and error 500 pages And a few other Custom elements and plugins including: Pure CSS3 checkbox, radio and On/Off switch elements (not available in IE8) File input control Simple color picker Custom scrollbars Onpage help to provide better help for users Bootstrap, jQuery UI and third party plugins and elements including: jQuery jQuery UI (Custom Build) Twitter Bootstrap FontAwesome Google "Open Sans" Font jQuery Flot Charts jQuery Sparklines Easy Pie Chart jQuery Knob jQuery Validate FuelUX (Spinner & Wizard & Treeview) FullCalendar jQuery ColorBox jQuery dataTables jQuery Chosen jQuery Masked Input jQuery Input Limiter jQuery AutoSize Bootstrap Colorpicker Bootstrap Datepicker Bootstrap Timepicker Bootstrap DateRange Picker Bootstrap Date-Time Picker Bootbox.js jQuery Gritter jQuery slimScroll Spin.js jQuery UI Touch Punch Google Code Prettify ExplorerCanvas Mindmup Wysiwyg Editor Toopay Markdown Editor X-editable Select2 Bootstrap Tags jQuery Mobile (Custom Build) jqGrid Dropzone.js Nestable lists plugin typeahead.js Dual listbox Multiselect jQuery raty The following is on to-do list and will be added to Ace in next updates: New features & elements such as : Wysiwyg editor (now available) Treeview (now available) Timeline (now available) Search results Tables with details FAQ page (now available) User profile (now available) Inline editable data (now available) File upload and management Email template (now available) Inbox & messages (now available) Misc. page templates Cookie support for saving client-side customizations (now available) RTL Support (now available) Adding LESS files as well as Javascript client-side template files such as Mustache. (now available) Please note that support is provided via email as mentioned in the documentation page.
软件名称: OrchidPrinter(兰花报表控件) 软件版本: 2.1(20次限次版) 大小 : 116k 作品简介: OrchidPrinter是一款专门针对中国国情并参照国外的类似软件编制的专门针对VB,VC的报表工具软件, 使用VC 6.0制作,这个报表工具软件可以让您快速,容易的进行预览及打印输出.它支持多列,文本自动 换行,页头和页尾,表格及段落,图形. OrchidPrinter 也支持右键弹出菜单. 现在的程序是20次限次版,只能使用20次打印输出,您可以下载它进行试用. 若您需要发行版,请与我联系. 您需要把MFC42.DLL拷贝到Windows的system目录下.然后运行regsvr32 MFC42.DLL. 您需要把OrchidPrinter.ocx拷贝到Windows的system目录下.然后运行regsvr32 orchidprinter.ocx. 您需要把OrchidPrinter.hlp拷贝到Windows的help目录下. opSamples目录下的VB程序是我的测试程序,如果显示的字体不对请把ListBox的字体改为";宋体";. VcTest目录下的VC程序是我的测试程序. 2.0版新增了对用户进行打印机设置的支持,使您的程序可以做到不用考虑用户的打印机和纸张大小, 完全由用户在预览时进行调整,使您脱离设计报表的苦海. 2.1版新增了PaperChanged事件,在用户对打印机进行设置后将激发此事件,您可以在此事件中进行 报表的重画. 注意 : 这不是共享软件,也不是自由软件,如果您愿意使用,您必须付费, 这是我个人的产品.请用 email 与我联系. 作者 : 史仲浩 email : shizhonghao@sohu.com

2,497

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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