[Lazarus] Some information about DBNavigator and DBGrid single applications

"ArĂ­ Ricardo Ody" aro52 at gmx.com
Tue Jul 26 17:04:08 CEST 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110726/10c18a93/attachment-0002.html>


More information about the Lazarus mailing list