⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 问题.txt

📁 delphi编写的图书管理系统,一般的管理系统
💻 TXT
字号:
1,用sql提取表中字段,并按某字段排序

解决办法:使用order by
ASC:升序(默认方式)
DESC:降序
如:select * from t1 order by score1 DESC, score2 ASC
(有多个排序时,用“,”分开)

2,如何把用sql统计结果保存下来

解决办法:利用tquery的recordcount属性,再加条件限制(where子句)
如:
q.sql.add('select * from t1 where score1>=75 and score1<85');
q.open;
i:=q.recordcount;//得到统计结果


3.在table的beforepost中控制是否保存修改
if messagedlg('数据已经修改,保存吗?',mtconfirmation,[mbYes,mbNo],0)=mrNo then
abort;


4.遍历一个容器中的控件,并在遍历时查看它是什么类型的控件,该怎么做
for i:=0 to groupbox1.components.count-1 do
if groupbox1.components[i] is TEdit then
    (groupbox1.components[i] as TEdit).text:='';


5撤消edit(dbedit,memo,dbmemo等)的修改
procedure cancelmodified(var e:TEdit);
begin
if e.modified then e.undo;
end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -