D
desertyj
Unregistered / Unconfirmed
GUEST, unregistred user!
提示下列错误:<br>Project set_form1.exe raised exception class EAccessViolation with <br>message 'Access violation at address 004ADAA7 in module <br>'set_form1.exe '. Read of address 00000058 '. Process stopped. Use <br>Step or Run to continue. <br><br>然后光标就停在: "QXM_ADOQ.Connection:=ksxt_DM.tk_ADOC" 这一行. <br><br>请各位大虾帮忙解决下,小弟在此谢过了!(小弟是个初学者)<br>代码如下<br>procedure TSet_F.FormShow(Sender: TObject);<br>var<br> QXM_ADOQ:TADOQuery;<br>begin<br> YH_ADOQ.Close;<br> YH_ADOQ.SQL.Clear;<br> YH_ADOQ.SQL.Add('SELECT A.UserName as 用户名,B.qxid as 权限 FROM yh AS A ');<br> YH_ADOQ.SQL.Add('INNER JOIN QX AS B ON A.QXID=B.QXID');<br> YH_ADOQ.Open;<br> QXM_ADOQ:=TADOQuery.Create(nil);<br> QXM_ADOQ.Connection:=ksxt_DM.tk_ADOC;<br> QXM_ADOQ.SQL.Add('SELECT qxm FROM qx');<br> QXM_ADOQ.Open;<br> while not QXM_ADOQ.Eof do<br> begin<br> QX_CB.Items.Add(QXM_ADOQ.FieldValues['QXM']);<br> QXM_ADOQ.Next;<br> end;<br> QXM_ADOQ.Close;<br> FreeAndNil(QXM_ADOQ);<br><br> ShowYHInfo;<br><br> YH_ADOT.TableName:='yh';<br> YH_ADOT.Open;<br>end;