H
haifeilong
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.FormCreate(Sender: TObject);<br>begin<br>With adoquery1 do<br> begin<br> Close;<br> SQL.Clear;<br> SQL.Add('select username from T_User');<br> Open;<br> end;<br>end;<br><br>procedure TForm1.RzDBGrid1DblClick(Sender: TObject);<br>begin<br> With adoquery2 do<br> begin<br> Close;<br> SQL.Clear;<br> SQL.add('select * from T_User where username=yhm');<br> Parameters[0].Value:=adoquery1.fieldbyname('username').AsString;<br> Open;<br> end;<br>RzComboBox1.Text:=adoquery2.FieldByName('sex').AsString;<br>RzEdit2.Text:=adoquery2.FieldByName('name').AsString;<br>RzEdit5.Text:=adoquery2.FieldByName('age').AsString;<br>RzComboBox2.Text:=adoquery2.FieldByName('shengxiao').AsString;<br>RzComboBox3.Text:=adoquery2.FieldByName('xinzuo').AsString;<br>RzComboBox4.Text:=adoquery2.FieldByName('blood').AsString;<br>RzEdit6.Text:=adoquery2.FieldByName('school').AsString;<br>RzEdit7.Text:=adoquery2.FieldByName('job').AsString;<br>RzEdit8.Text:=adoquery2.FieldByName('QQ').AsString;<br>RzEdit9.Text:=adoquery2.FieldByName('E_Mail').AsString;<br>RzMemo1.Text:=adoquery2.FieldByName('address').AsString;<br>RzMemo2.Text:=adoquery2.FieldByName('memo').AsString;<br>end;<br><br>运行老是提示 List index out of bounds(0)<br>请问我上面的代码错在哪里啊!<br>各位大侠帮帮忙!我看了N遍了都没有找出答案! <br>谢谢了.....<br>我只想双击列表中的用户名,在旁边显示相应的用户资料,可是老是出错~<br>大家帮帮忙,帮我看看错在哪里?谢谢了..... <br><br>
最后编辑: