[Lazarus] Some information about DBNavigator and DBGrid single applications
"Arí Ricardo Ody"
aro52 at gmx.com
Tue Jul 26 17:18:38 CEST 2011
In the DBNavigator1Click I include the lines:
if Button = nbPost then
SQLQuery1.ApplyUpdates(-1);
The results remain unchanged. I repeat the process described below and everythings remain the same.
I suppose this if command attends your suggestion, William. Is this right?
Thanks
Ricardo
----- Original Message -----
From: William Oliveira Ferreira
Sent: 07/26/11 12:08 PM
To: Lazarus mailing list
Subject: Re: [Lazarus] Some information about DBNavigator and DBGrid single applications
I think you shoud use apllyUpdates from your dataset after post, no?
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informação
2011/7/26 "Arí Ricardo Ody" < aro52 at gmx.com >
I built a single application to browse and update a SQLite database that have 1 table with 2 columns: num and name
I inserted 2 lines in the table begin my tests.
The application consists in a DBNavigator and DBGrid. When I ran the program the grid appears and the 2 lines appear normally in the grid. Everything seems to be fine.
Then I try to include a new line in the grid by click on "+"(insert) button of the DBNavigator. It appears a new line in the grid. I type a number and name and click the "post" button of the DBNavigator. The grid appears now with 3 lines. I repeat the operation and the grid appears with 4 lines. As expected.
In this moment I click the "refresh" button of the DBNavigator. Surprise! I receive the original grid with the 2 lines I inserted originally. E.g., the insertions don't occurs in the database although the new lines appear in the grid before I click the refresh button.
There was a SQLite3 connection, a SQLQuery, a Datasource and a SQLTransaction. Are these components plus DBNavigator and DBGrid data-aware components? It seems that they don't.
Other question: After I click the "+" button in the DBNAvigator and type the newline, how can I get in my code the values typed in the new line?
Greetings from Sao Paulo - Brazil
Ricardo
--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110726/20c94a11/attachment-0003.html>
More information about the Lazarus
mailing list