Solved

Delphi Programming question

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

911 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

21 Experts available now in Live!

Get 1:1 Help Now