英文版吻别在线试听:在Delphi中的下拉框ComboBox怎么连数据库 Fieldbyname的用法
来源:百度文库 编辑:中财网 时间:2024/10/05 14:37:09
在Delphi中的下拉框ComboBox怎么连数据库 Fieldbyname的用法
2007-04-13 22:50:36
在Delphi中的下拉框怎么连数据库阿ADOConnection1,AdoQuery1,button1,combobox1 各一个。
比如说点一下button1,将数据库内容填入到combobox1中
1、AdoConnection1的ConnectionString设置一下
2、AdoQuery1的Connection属性,选择AdoConnection1
3、procedure TForm1.Button1Click(Sender: TObject);
begin
with AdoQuery1 do
begin
close;
sql.clear;
sql.add('select distinct a from table');
open;
combobox1.items.clear;
while not eof do
begin
combobox1.items.add(fieldbyname('a').asstring);
next;
end;
end;
end;
---------------------------------------
Fieldbyname的用法
(teacherDM.loginAdoQuery.fieldByName('password').asString<>Trim(passwordEdt.Text))
---
query1.append;
query1.fieldbyname('字段1').value := xxx;
query1.fieldbyname('字段2').asstring := xxxx;
query1.fieldbyname('字段3').asinteger := xx;
...
query1.post;
在Delphi中的下拉框怎么连数据库阿?
Delphi中的combobox控件连接数据库的问题~!~!
delphi中如何使用combobox?
怎样在combobox中显示表中的一列数据 怎样在combobox中显示表中的一列数据
vb.net winform中combobox不允许输入,只允许从下拉框选择,行不行?
vs.net 编程时 ,用comboBox的下拉框为什么不能变高?
如何在DELPHI的下拉选择框中添加文字啊??
vb的下拉菜单ComboBox的使用方法
在HTML中的下拉框中怎样实现超连接?
[delphi]~~~~BDE中的configuration在哪里?
怎么在DELPHI中的StringGrid组件中付值????
mh5算法在delphi中的实现
md5算法在delphi中的应用
delphi中的label组件在哪?
怎样删除下拉框中的历史记录?
怎麽去除下拉框中的内容?
如何清理下拉框中的搜索项
如何消除下拉框中的内容
word中的下拉框该怎么设置
word中的下拉框该怎么设置?
如何获取delphi 列表框中的值?
如何清理在百度搜索下拉列表中的网址
遗传算法在试题组卷中的应用(delphi)?
遗传算法在试题组卷中的应用(delphi)?