Sintak SQL dan Delphi

procedure TForm1.Button1Click(Sender: TObject);

begin

adoquery1.Close; adoquery1.SQL.Clear; adoquery1.SQL.Add(‘SELECT ‘); adoquery1.SQL.Add(”’Daftar Produk Supplier : ”+a.CompanyName as Judul,’); adoquery1.SQL.Add(‘B.ProductID,A.CompanyName,b.ProductName,’); adoquery1.SQL.Add(‘b.QuantityPerUnit,b.UnitPrice,b.UnitsInStock ‘); adoquery1.SQL.Add(‘FROM suppliers a, Products b ‘); adoquery1.SQL.Add(‘where a.SupplierID=b.SupplierID ‘); adoquery1.SQL.Add(‘AND a.CompanyName = :CN’); adoquery1.Parameters[0].Value := combobox1.Text; adoquery1.Prepared := true; adoquery1.Open; //kalau data ada

if adoquery1.RecordCount > 0 then

frxReport1.ShowReport();

end;

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: