F
fastrunner
Unregistered / Unconfirmed
GUEST, unregistred user!
在编程序时出现这样的提示:
Project ESWL.exe raised exception calss EAccessVilation with message 'acces
violation at address 4E8E739C in module 'BANTAM.DLL'.Read of address FFFFFFFF'.
Process stopped.Use Step or Run to continue.
程序如下:
userlogin:=Tuserlogin.Create(Application);
userlogin.show;
{userlogin.showmodal;
userlogin.update;
if userlogin.ModalResult=1 then
begin }
{frm_main:=Tfrm_main.Create(Application);
frm_main.Show;
frm_main.Update;当使用以上代码时数据库会出错!}
Application.Initialize;
Application.Title := 'ESWL病历管理系统';
Application.CreateForm(Tuserlogin, userlogin);
Application.CreateForm(Tfrm_main, frm_main);
Application.CreateForm(TAboutBox, AboutBox);
Application.CreateForm(Tfrm_newrecord, frm_newrecord);
Application.CreateForm(Tfrm_delrecord, frm_delrecord);
Application.CreateForm(Tfrm_charecord, frm_charecord);
Application.CreateForm(Tfrm_query_date, frm_query_date);
Application.CreateForm(Tfrm_query_name, frm_query_name);
Application.CreateForm(Tfrm_query_job, frm_query_job);
Application.CreateForm(Tfrm_query_option, frm_query_option);
Application.CreateForm(Tfrm_change, frm_change);
Application.CreateForm(Tfrm_anal_xb, frm_anal_xb);
{Application.CreateForm(Tfrm_anal_job, frm_anal_job);}
Application.CreateForm(Tfrm_user_add, frm_user_add);
Application.CreateForm(Tfrm_user_del, frm_user_del);
Application.CreateForm(Tfrm_user_edit, frm_user_edit);
Application.CreateForm(Tfrm_anal_age, frm_anal_age);
frm_main.Hide;
frm_main.Free;
Application.Run;
{ end; }
ADDUSER程序如下:
if (Edit1.text='') then
MessageDlg('没有输入用户名!',mtError,[mbCancel],0)
else if (Edit2.text='') then
MessageDlg('没有输入密码!',mtError,[mbCancel],0)
else
with users do
begin
close;
open;
if FieldByName('username').Asstring<>(Edit1.text) then
begin
messagedlg('没有找到该用户!请确定是否正确!',mtInformation,[mbOK],0);
exit;
end
else if FieldByName('password').Asstring<>(Edit2.text) then
MessageDlg('密码不正确,请重新输入!',mtError,[mbCancel],0)
else if FieldByname('userlevel').Asinteger=1 then
begin
……
END
……
请问是哪个出错了?
在下做了很久,知道是这两个程序有问题,但是找不出来。请指教。
Project ESWL.exe raised exception calss EAccessVilation with message 'acces
violation at address 4E8E739C in module 'BANTAM.DLL'.Read of address FFFFFFFF'.
Process stopped.Use Step or Run to continue.
程序如下:
userlogin:=Tuserlogin.Create(Application);
userlogin.show;
{userlogin.showmodal;
userlogin.update;
if userlogin.ModalResult=1 then
begin }
{frm_main:=Tfrm_main.Create(Application);
frm_main.Show;
frm_main.Update;当使用以上代码时数据库会出错!}
Application.Initialize;
Application.Title := 'ESWL病历管理系统';
Application.CreateForm(Tuserlogin, userlogin);
Application.CreateForm(Tfrm_main, frm_main);
Application.CreateForm(TAboutBox, AboutBox);
Application.CreateForm(Tfrm_newrecord, frm_newrecord);
Application.CreateForm(Tfrm_delrecord, frm_delrecord);
Application.CreateForm(Tfrm_charecord, frm_charecord);
Application.CreateForm(Tfrm_query_date, frm_query_date);
Application.CreateForm(Tfrm_query_name, frm_query_name);
Application.CreateForm(Tfrm_query_job, frm_query_job);
Application.CreateForm(Tfrm_query_option, frm_query_option);
Application.CreateForm(Tfrm_change, frm_change);
Application.CreateForm(Tfrm_anal_xb, frm_anal_xb);
{Application.CreateForm(Tfrm_anal_job, frm_anal_job);}
Application.CreateForm(Tfrm_user_add, frm_user_add);
Application.CreateForm(Tfrm_user_del, frm_user_del);
Application.CreateForm(Tfrm_user_edit, frm_user_edit);
Application.CreateForm(Tfrm_anal_age, frm_anal_age);
frm_main.Hide;
frm_main.Free;
Application.Run;
{ end; }
ADDUSER程序如下:
if (Edit1.text='') then
MessageDlg('没有输入用户名!',mtError,[mbCancel],0)
else if (Edit2.text='') then
MessageDlg('没有输入密码!',mtError,[mbCancel],0)
else
with users do
begin
close;
open;
if FieldByName('username').Asstring<>(Edit1.text) then
begin
messagedlg('没有找到该用户!请确定是否正确!',mtInformation,[mbOK],0);
exit;
end
else if FieldByName('password').Asstring<>(Edit2.text) then
MessageDlg('密码不正确,请重新输入!',mtError,[mbCancel],0)
else if FieldByname('userlevel').Asinteger=1 then
begin
……
END
……
请问是哪个出错了?
在下做了很久,知道是这两个程序有问题,但是找不出来。请指教。