Yazdığım sql kodu tek butonla hatasız bir şekilde çalışıyor.
Kod: Tümünü seç
procedure TForm1.Button1Click(Sender: TObject);
begin
with yeni.Query1 do
begin
Close;
Prepare;
SQL.Clear;
SQL.Add('select TARIH, ILAC_ADI,'+PageControl1.ActivePage.Name+' from eczane where ( '+PageControl1.ActivePage.Name+' is not null)');
Open;
end;
end;
Örneğin pagecontrol haraketinde page değişikliğinde DBedit table da alanı bulamadı hatası veriyor.
Kod: Tümünü seç
procedure TForm1.PageControl1Change(Sender: TObject);
begin
DBEdit1.DataField:=PageControl1.ActivePage.Name;//Bu kod tek başına olduğunda yani sorgu olmadığında çalışıyor.
{Sorgu haraketinden sonra alanı bulamadı hatası veriyor.}
Panel2.Caption:=PageControl1.ActivePage.Caption+' Servisi';
with yeni.Query1 do
begin
Close;
Prepare;
SQL.Clear;
SQL.Add('select TARIH, ILAC_ADI,'+PageControl1.ActivePage.Name+' from eczane where ( '+PageControl1.ActivePage.Name+' is not null)');
Open;
end;
end;
Ayrıca Formun creative konudugunda ise adres hatası veriyor.
En içten saygılarımla...
