delete selected record in tViewlist with mysql

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
drama22
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 12.08.2014, 09:49

delete selected record in tViewlist with mysql

Post by drama22 »

iam trying to delete selected item from TListview and from mysql i do somthing like this

Code: Select all

procedure Tusersitngs.btnRemoveClick(Sender: TObject);
begin
delquery.Active := True;
delquery.Close;
delquery.SQL.Clear;
delquery.SQL.Text := 'delete from store where imit := Tlistview.item.selected';
delquery.ExecSQL;
end;
but i got sql is emty any idea ?
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: delete selected record in tViewlist with mysql

Post by EgonHugeist »

but i got sql is emty any idea ?
Yes. Please look to your SQL.Text assembling again. Don't you think:

Code: Select all

delquery.SQL.Text := 'delete from store where imit := 'Tlistview.item.selected;
would be right? :mrgreen:
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
drama22
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 12.08.2014, 09:49

Re: delete selected record in tViewlist with mysql

Post by drama22 »

yes thank you i found the problem its

Code: Select all

:=
and i have to add parambyname Thank you.
Post Reply