Close it

Sabtu, 02 April 2011

0 Insert, Update, Delete SQL►► URL : http://wwdq.blogspot.com/2011/04/insert-update-delete-dg-sql.html.

Share
// Insert record
procedure TForm1.Button1Click(Sender: TObject);
begin
  with Query1 do
  begin
    Active:=False;
    SQL.Clear;
    SQL.Add('Insert into country(NAME,CAPITAL,CONTINENT,AREA,POPULATION)
               values(
                 ''A_My_Country'',
                 ''A_My_Capital'',
                 ''A_My_Continent'',
                 1,
                 1)');
    ExecSQL;
  end;
  Table1.Refresh;
end;

// Delete record
procedure TForm1.Button2Click(Sender: TObject);
begin
  with Query1 do
  begin
    Active:=False;
    SQL.Clear;
    SQL.Add('Delete from country where name=''A_My_Country''');
    ExecSQL;
  end;
  Table1.Refresh;
end;

//Update record
procedure TForm1.Button3Click(Sender: TObject);
begin
  with Query1 do
  begin
    Active:=False;
    SQL.Clear;
    SQL.Add('Update country set name=''A_Your_Country''
               where name=''A_My_Country''');
    ExecSQL;
  end;
  Table1.Refresh;
end;

Bila Kurang Jelas, silakan bertanya dibawah ini .

Post Info :
Judul = Insert, Update, Delete SQL

Url = http://wwdq.blogspot.com/2011/04/insert-update-delete-dg-sql.html

Author = Rizal Loa Wanda. At : 14.46 Sabtu, 02 April 2011 | Comment:0

Artikel Terkait

Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

0 Comment: on "Insert, Update, Delete SQL"

Posting Komentar

No Spam Please :)


Tambahkan Bookmark halaman ini untuk mempermudah Pencarian Anda [CTRL+D].