![]() |
|
#1
|
|||
|
|||
|
Hi all
I have two form in my app,in first one i have a DBGrid with around 3000 Records and in second form i allow user to edit one record of this DBGRID. in the other hand when user click on EDIT button, i will open second form just for editing selected record.you may think this is stupid BUT for some reasons i have to implement EDIT in this way. My problem is when user edits a record in second form and clicks on Ok button i Post the new data and close th second form and after that i REQUERY the First Form DBGrid to refresh the data......Here is my problem because i have a lot of recordsin this DBGRID , it takes a lot of time to populate records. is there any way to refresh or requery ONLY Edited record not all records??? Any help greatly would be appreciated. Kind Regards |
|
#2
|
|||
|
|||
|
Do you mind if I ask you what DB Engine you are using as
i have alot more records than that and the refresh is quite quick? |
|
#3
|
|||
|
|||
|
Why don't you post the changes to the query on form1 so you don't have to re-query again something like:
[DELPHI]Form1.Query.Edit; //Assign new values from Form2. Form1.Query.Post;[/DELPHI] Regards, Abdulaziz Jasser |
|
#4
|
|||
|
|||
|
If you assign a dataset to the dbgrid and post directly on this you'll have no problems with performance. I also believe that the requery isn't needed when you use this approach...
Objective reality is a delirium caused by lack of alcohol in blood. There is no place like 127.0.0.1 |
|
#5
|
|||
|
|||
|
Hi
Thanks guys but as i said already for some reasons i have to edit my record manually through building UPDATE Command (update testtable set field=....) so in this way i have to REQUERY the dataset only for one record change!!! kind regards. |
|
#6
|
|||
|
|||
|
Did you try and set RequestLive to true, and then edit the
data directly? Depends on how complicated the SQL is though. |
|
#7
|
|||
|
|||
|
Hi
Thanks for your reply I'm using AdoDataset with sqlserver 2000 Kind Regards. |
|
#8
|
|||
|
|||
|
Do you call the ReQuery method for TADODataset? Or do you call the Close/Open?
With best regards, Mike Shkolnik http://www.scalabium.com |
|
#9
|
|||
|
|||
|
Hi Friend
I only use Requery() Method. Regards. |
|
#10
|
|||
|
|||
|
What DB Engine are using? Give more details.
Regards, Abdulaziz Jasser |
![]() |
| Thread Tools | |
| Display Modes | |
|
|