Page 1 of 1

Update without CloseOpen

Posted: Mon 29 Oct 2007 14:46
by syrov_andrei
I work with SDAC 3.8
I Have a TMSQuery, record set work with data from many tables.
Some thread of my Application get infomation from outside and save this information to the database.
I want update record in record set of TMSQuery, but not reopen or call refresh of this Query, becouse I have all of needed data to show new value of each field of TMSQuery in my program.
What kind of method I must call.
Thanks.

Posted: Mon 29 Oct 2007 16:15
by Antaeus
The RefreshQuick method may be useful in some cases, but it cannot work with compound queries.

Posted: Tue 30 Oct 2007 04:45
by syrov_andrei
Antaeus wrote:The RefreshQuick method may be useful in some cases, but it cannot work with compound queries.
...Can I write some values to record of DataSet use method SetFields or other ?

I want show in record values, which I apply to database, and I have this values in application, but I don`t want reopen or refresh dataset, beacouse this take some time.

Can I write my values to adress in memory and after that show its in record of dataset ?
What method or properties I must use ?

Thanks.

Posted: Wed 31 Oct 2007 13:28
by Antaeus
If the RefreshRecord is not an appropriate solution, I can suggest you another way.
This way requires that your application know what values must be changed. Just set the TMemDataSet.LocalUpdate property to True, and change all records you need by Edit/Post. Update commands will not be sent to the server.