Solved

Delphi Programming question

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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Delphi Mdi application Child forms get behind control 7 349
Base1 Encode/Decode 3 96
Firemonkey BASS_Init into a thread 17 76
migrate this code to work on android 1 42
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…
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…
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

739 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