1、 解决数据库每次换位置就要重新连接的问题
UniConnection1.Database := ExtractFilePath(Application.ExeName)+'manage.db.db';
UniConnection1.Connect;Self.tb_user.Open;
2、先执行sql语句,然后再清,否则会出现sqls 的值等于0,出现错误。
sqls := 'select * from tb_Operator where username =''' + self.dbedt1.Text + '''';
with DM.q_user do
begin
SQL.Clear;
SQL.Add(sqls);
Open;
First;
3、让显示整张表时,如果不关闭表就会出现无法显示。
SQL.Clear;
SQL.Add(select * from tb_operator );
close;