Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Databases
»
Update individual row in datagrid
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
problem executting tproce...
by
Martin_fr
[
Today
at 01:11:16 am]
Help with task using arra...
by
Kays
[
Today
at 12:43:35 am]
Are there any existing vn...
by
willbprog9933
[March 02, 2021, 11:19:57 pm]
Copy the contents of a po...
by
jamie
[March 02, 2021, 10:46:41 pm]
Using WebSockets with Laz...
by
Warfley
[March 02, 2021, 10:33:16 pm]
Adding event to a runtime...
by
justnewbie
[March 02, 2021, 09:59:09 pm]
50 years of Pascal
by
willbprog9933
[March 02, 2021, 09:52:07 pm]
[RESOLVED]Error ExportPDF
by
berghem
[March 02, 2021, 09:38:57 pm]
Websockets Server/Client ...
by
Warfley
[March 02, 2021, 09:29:52 pm]
LAMW: jMsSqlJDBCConnectio...
by
af0815
[March 02, 2021, 09:14:34 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Update individual row in datagrid (Read 249 times)
pcurtis
Sr. Member
Posts: 430
Update individual row in datagrid
«
on:
January 21, 2021, 12:38:08 pm »
Hi All,
I am using sqlite with zeos.
My question is "How can I show changes to a row in a DBGrid without refreshing the whole dataset?"
Test app attached.
Logged
Windows 10 / Linux Mint 20
Laz 2.10.0
FPC 3.2.0
paweld
Sr. Member
Posts: 262
Re: Update individual row in datagrid
«
Reply #1 on:
January 21, 2021, 08:45:39 pm »
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
Button2Click
(
Sender
:
TObject
)
;
var
iTEMP
:
integer
;
begin
if
ZQuery1
.
IsEmpty
then
exit
;
iTEMP
:
=
Random
(
10
)
;
ZQuery1
.
Edit
;
ZQuery1
.
FieldByName
(
'fnCOUNT'
)
.
AsInteger
:
=
iTEMP
;
ZQuery1
.
ApplyUpdates
;
Button2
.
Caption
:
=
iTEMP
.
ToString
;
end
;
if you use only one table in query you can do it this way, but if you use several tables (e.g. via JOIN) then you have to use the
ZUpadateSQL
component
Logged
Best regards
paweld
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Databases
»
Update individual row in datagrid
TinyPortal
© 2005-2018