var
Form1: TForm1;
var con:string;implementation{$R *.dfm}procedure TForm1.FormActivate(Sender: TObject);begin
con:='Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=caiwu;Data Source=YJW ' ;
ADOConnection1.ConnectionString:=con;
ADOConnection1.Connected :=true;
adoquery1.Connection:= ADOConnection1;end;procedure TForm1.Button1Click(Sender: TObject);
begin
if RadioButton1.Checked=true then
begin
adoquery1.SQL.Clear;
adoquery1.SQL.Add('SELECT * FROM RenYuanBiao WHERE UserName='+''''+Edit1.Text+'''');
adoquery1.open;
end;
if RadioButton2.Checked=true then
begin
adoquery1.SQL.Clear;
adoquery1.SQL.Add('SELECT * FROM RenYuanBiao WHERE name='+''''+Edit1.Text+'''');
adoquery1.open;
end;
end;end.查询没反应!
并且要求要输入password
Form1: TForm1;
var con:string;implementation{$R *.dfm}procedure TForm1.FormActivate(Sender: TObject);begin
con:='Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=caiwu;Data Source=YJW ' ;
ADOConnection1.ConnectionString:=con;
ADOConnection1.Connected :=true;
adoquery1.Connection:= ADOConnection1;end;procedure TForm1.Button1Click(Sender: TObject);
begin
if RadioButton1.Checked=true then
begin
adoquery1.SQL.Clear;
adoquery1.SQL.Add('SELECT * FROM RenYuanBiao WHERE UserName='+''''+Edit1.Text+'''');
adoquery1.open;
end;
if RadioButton2.Checked=true then
begin
adoquery1.SQL.Clear;
adoquery1.SQL.Add('SELECT * FROM RenYuanBiao WHERE name='+''''+Edit1.Text+'''');
adoquery1.open;
end;
end;end.查询没反应!
并且要求要输入password
解决方案 »
- delphi中的异常和错误之类的在哪里可以找到帮助
- VCL架构剖析,DELPHI源码分析,DELPHI面向对象编程思想,这个3本书应该先看哪一本???
- ADOConnection连接有口令的Access数据库出错!口令正确救急!
- 亲问一个小问题~
- 我是学校的系统管理员,我打算编一个软件,大家能帮我吗?
- 怎么拦截串口程序传给硬件的数据
- 定制hint
- 在线等待:Delphi中的TList相对C#中是什么类啊?
- ●真累啊,前几天我已发布扫描线填充多边形的绘图程序,现在我的基于该程序的图案(可自己定义)填充程序也已完工(昨晚一宿没睡呀),欢迎大家参予讨论,并有其他代码发布 ●
- 菜单问题:怎样能知道菜单被收起?
- 汕头delphi项目
- 请问怎么用delphi把avi格式文件转成wma格式的啊
con串要改下,把密码加上。
加了密码还是要你输入密码!
输入后查询还是没反应!
if RadioButton1.Checked=true then
begin
with adoquery1 do
close;
filter:='usernaem= '''+eidt1.text+'''';
filtered:=true;
open;
end;
end;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('SELECT * FROM RenYuanBiao WHERE name='+''''+Edit1.Text+'''');
adoquery1.open;