selamlar;
aşagıdaki kod ile anladıgınız uzere mamul_kodu Listbox da secili olan item'a eşit olma durumu kontrol edilmek isteniyor ancak kod bu şekilde iken "Invalid coloum name....." şeklinde hata mesajı veriyor.sebebi nedir?
teşekkürler....
procedure TForm1.ListBox1Click(Sender: TObject);
begin
with dm.ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select ham_kodu,mamul_kodu from tblstokurm where mamul_kodu='+ListBox1.Items.Strings[ListBox1.itemindex]);
Open;
ListBox2.Items.Clear;
while not dm.ADOQuery1.Eof do
begin
ListBox2.Items.Add(FieldByName('ham_kodu').AsString);
Next;
end;
end;
end;
procedure TForm1.ListBox1Click(Sender: TObject);
begin
with dm.ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select ham_kodu,mamul_kodu from tblstokurm where mamul_kodu='+ListBox1.Items.Strings[ListBox1.itemindex]);
Open;
end;
if dm.ADOQuery1.RecordCount > 0 Then
Begin
ListBox2.Items.Clear;
while not dm.ADOQuery1.Eof do
begin
ListBox2.Items.Add(FieldByName('ham_kodu').AsString);
Next;
end;
End;
end;