表在进行sql语句之前有没有关闭?
麻烦将出错语句标明一下谢谢
麻烦将出错语句标明一下谢谢
解决方案 »
- 【CSDN开心辞典】水分(非技术分)最多的ID是谁?
- RemoveMenu怎么没用??
- 怎样把字符串转化为16进制?
- dspack 问题 当应用程序采用 Build with runtime packages方式的时候关闭是释放老是错误
- 谁能介绍些比较好的学习网站给我...
- 请问如何用语句向excel表格中的一格加上一个数据??请进。。。
- 帮忙看看,简单问题
- delphi编写的读写.dbf数据库的程序如何打包分发?
- 请大家谈谈程序员和系统分析员
- 请问如何使用TTreeView的OverlayIndex和StateIndex这两个属性?
- 老鱼,老千,小新,快来看看这段程序~~~参加讨论者都有分
- 如何获取当前系统安装的ADO的版本
格式是否为:DataModel.QUERY
在clear前加一句:clsoe;
with login_dm.dm_fzdd.wwq_yhb do
出错了
begin
close;//这儿要先close一下吗?
sql.Clear;
sql.add(str1);
showmessage(str1);
execsql;
if login_dm.dm_fzdd.wwq_yhb.IsEmpty then
begin
showmessage('你输入的用户名和密码有误!');
e_yhm.text:='';
e_yhmm.text:='';
e_yhm.SetFocus;
end
else
form2.Show;
//form1.Close;
end;
execsql要改成open!
快救救我
var
a, b :string;
str1 :string;
begin
a:=trim(e_yhm.text);
b:=trim(e_yhmm.text);
str1:='select * from t_yhb where yhm='''+trim(a)+''' and yhmm='''+trim(b)+'''';
with login_dm.dm_fzdd.wwq_yhb do
begin
//加上close;
sql.Clear;
sql.add(str1);
showmessage(str1);
execsql;
//怎么敢execsql(insert ,update用的),要open呀
if login_dm.dm_fzdd.wwq_yhb.IsEmpty then
begin
showmessage('你输入的用户名和密码有误!');
e_yhm.text:='';
e_yhmm.text:='';
e_yhm.SetFocus;
end
else
form2.Show;
//form1.Close;
end;
//close;
end;
要fieldbyname()
procedure TForm1.bb_yesClick(Sender: TObject);
var
a, b :string;
str1 :string;
begin
a:=trim(e_yhm.text);
b:=trim(e_yhmm.text);
str1:='select * from t_yhb where yhm='''+trim(a)+''' and yhmm='''+trim(b)+'''';
with login_dm.dm_fzdd.wwq_yhb do
begin
close;
sql.Clear;
sql.add(str1);
showmessage(str1);
open;
//execsql;
if login_dm.dm_fzdd.wwq_yhb.IsEmpty then
begin
showmessage('你输入的用户名和密码有误!');
e_yhm.text:='';
e_yhmm.text:='';
e_yhm.SetFocus;
end
else
form2.Show;
//form1.Close;
end;
//close;
end;
access violation at address oo545e4 in modale 'login.exe' read of address 0000084
在 with dm_fzdd.wwq_yhb do 处出错了