Solved

Delphi Programming question

Posted on 1997-09-24
1
135 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
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now