Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Databases
»
Update individual row in datagrid
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
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
RayLib 5.0
by
Guva
[
Today
at 11:25:40 am]
The weird Rewrite bug
by
Nitorami
[
Today
at 10:55:05 am]
FpDebug unexpected Assemb...
by
440bx
[
Today
at 10:34:54 am]
InstallAware Using Lazaru...
by
Thaddy
[
Today
at 10:13:05 am]
Lazarus for Windows on aa...
by
hansotten
[
Today
at 09:59:24 am]
CocoaInt.CocoaIconUse no ...
by
MISV
[
Today
at 09:20:40 am]
Azure sql database will n...
by
paweld
[
Today
at 07:41:17 am]
Does anyone know why this...
by
TYDQ
[
Today
at 06:39:17 am]
TBGRABitmap.TextSize retu...
by
hedgehog
[
Today
at 06:07:46 am]
AI, NLP and CAI: Text Gen...
by
schuler
[
Today
at 04:26:36 am]
Demoscene Square dot flag...
by
KodeZwerg
[
Today
at 03:47:30 am]
How does Castle Game Eng...
by
michalis
[
Today
at 02:51:40 am]
Have anyone develop UEFI ...
by
440bx
[April 16, 2024, 09:39:52 pm]
For-in loop over constant...
by
VisualLab
[April 16, 2024, 09:15:53 pm]
BUG REPORT: Unable to gen...
by
PascalDragon
[April 16, 2024, 09:02:49 pm]
Lazarus project made on M...
by
Odacir
[April 16, 2024, 08:56:58 pm]
Is it possible to support...
by
PascalDragon
[April 16, 2024, 08:51:36 pm]
CORBA interface and Varia...
by
PascalDragon
[April 16, 2024, 08:35:43 pm]
Macros confuse error mess...
by
PascalDragon
[April 16, 2024, 08:13:25 pm]
Form scaling
by
fxeconomist
[April 16, 2024, 08:09:39 pm]
Post your internal error ...
by
Eugene Loza
[April 16, 2024, 07:12:35 pm]
C-evo: New Horizons 1.3.0...
by
Chronos
[April 16, 2024, 06:32:41 pm]
How can i make this windo...
by
Handoko
[April 16, 2024, 06:23:43 pm]
pre-processor symbol when...
by
paule32
[April 16, 2024, 05:11:35 pm]
How are cookies share Web...
by
Thaddy
[April 16, 2024, 04:59:59 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Update individual row in datagrid (Read 769 times)
pcurtis
Hero Member
Posts: 951
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 20H2
Laz 2.2.0
FPC 3.2.2
paweld
Hero Member
Posts: 992
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 / Pozdrawiam
paweld
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Databases
»
Update individual row in datagrid
TinyPortal
© 2005-2018