I have this query to update the items quantity and $
UPDATE productos
SET
stock = :stock
total = costo_uno*stock
WHERE
codigo = :codigo
in my button:
MyTable1.Edit;
QueryUpdate.Close;
QueryUpdate.SQL.Clear;
QueryUpdate.SQL.Text:='UPDATE productos SET stock,total= '+QuotedStr(inttostr(strtoint(DBedit3.Text)+strtoint(txtagregar.Text)))+'*'+QuotedStr(currtostr(strtoint(DBedit3.Text)*strtocurr(DBcosto_uno.Text)))+' WHERE codigo='+txtcodigo2.Text;
showmessage(QueryUpdate.SQL.Text);
QueryUpdate.Execute;
I only need to refresh $ when I change the items quantity,
Sample:
1 car=$150
If I buy 2 cars then $=300
3 cars =$450
But I have a mistake
Update with MyQuery
-
EdderU2RSE
- Posts: 10
- Joined: Tue 17 Apr 2007 19:47
My problem was solved
My problem was solved succesfully.
Thanks
Thanks
-
EdderU2RSE
- Posts: 10
- Joined: Tue 17 Apr 2007 19:47
My problem was solved
My problem was solved succesfully.
Thanks
Thanks
-
EdderU2RSE
- Posts: 10
- Joined: Tue 17 Apr 2007 19:47
My problem was solved :P
My problem was solved succesfully.
Thanks

Thanks