Solved

Delphi Programming question

Posted on 1997-09-24
1
140 Views
Last Modified: 2010-04-04
Hi,

My problem is that I've got a database with SQL trigger.
So, when I add a new record to the database, the new record
can't be seen in the DBGRID comp. linked to that database.
When I refresh  the database, then the new record can be see. The question is is there any chance to see the newly
added record without freshing the whole database?
Imagine the database contains 50.000 record. It lasts a lot
of time for refreshing.
So can be refreshed only the new record or not?
0
Comment
Question by:bandi081497
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
anilms earned 40 total points
ID: 1346154
1. Use the TQuery component to populate the DBGrid (instead of TTable). Have an SQL statement for populating the DBGrid.

2. To refresh the DBGrid, you have to call the close and open methods of the TQuery component. Ex:
QueryInvoice.close; QueryInvoice.open;

3. You can do this periodically by using a timer control. In fact security trading systems use this methodology to keep screens
upto date. Of course, if you are using MS SQL Server, you could
use an ODS service which would send a message to the Delphi program to close and open the TQuery component.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question