Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Refresh a dbgrid

Posted on 1998-04-06
3
Medium Priority
?
201 Views
Last Modified: 2010-04-06
The codes are like as:

>   Query1->Close();
>   Query1->SQL->Clear();
>   Query1->SQL->Add("insert into supply(suppno,suppname)\
>                     values ('255222','11xx')");
>   Query1->Close();
>   Query1->SQL->Clear();
>   Query1->SQL->Add("select * from supply");
>   Query1->Prepare();
>   Query1->Active = true;

But the dbgrid of the table was nort refreshed.
Need any suggestion. Thank you.
0
Comment
Question by:mathematics
[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
3 Comments
 
LVL 1

Accepted Solution

by:
extreme earned 400 total points
ID: 1361309
I suppose you have a TTable connected with that DBGrid. In fact, if you modify the Query, that don't modify the table. If you want to have the results of the query in a DBGrid, then you have to connect the DBGrid with a DataSource connected to the query.
0
 

Expert Comment

by:bijoyn
ID: 1361310
Hi ,

I noticed that in the above code that u have specified. U are not doing a Query1.ExecSQL to add the inserted record. Have u forgotten to do it or have u just slipped while typing the code ?????. Do a Query1.ExecSQL to solve the problem

Cheers,

Bijoy
0
 

Author Comment

by:mathematics
ID: 1361311
Thank Bijoy,I got it.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

618 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