Recent

Author Topic: My Grid doesn't refresh data  (Read 2059 times)

AEslabon4

  • New Member
  • *
  • Posts: 25
My Grid doesn't refresh data
« on: June 27, 2013, 05:27:23 pm »
Hello again!  :D

I include a simple program to show a problem I'm dealing with:  :'(

I have 3 buttons in my Form:

1-Open a Query and show the result in a Grid.
2-Close the Query
3-Terminate the Program

It works well... But if I made a change on the database using Flame Robin, the Grid in my Program doesn't show the new data. Only when I close the Program an run it again the changes are show in the Grid.

Why the Query is not refreshing the data?  :o
I'm doing something wrong?  %)

I appreciate the help.  :-[
The World is my Country, Science my Religion.
Christiaan Huygens

AEslabon4

  • New Member
  • *
  • Posts: 25
Re: My Grid doesn't refresh data
« Reply #1 on: June 28, 2013, 01:40:20 am »
By searching in others Posts. I found the solution to this:   :D

My Query doesn't refresh because the transaction (TSQLTransaction) is still active even when I close the Query!!  :o

Then, the solution is to put the code:  ;)

Code: [Select]
  SQLTrans1.EndTransaction;

Immediately after I close the Query.  :)

Thanks for the Help!!  :P
The World is my Country, Science my Religion.
Christiaan Huygens

 

TinyPortal © 2005-2018