Hello
I'm currently implementing ODAC as an alternative to NexusDB, and I have already come very far. My App in fact runs!
Here's still some trouble:
I'm used to using 2 table components for access to the same DB table, one for editing, and one for looking up data.
Here 's the trouble: when a record is posted using the edit table, the record cannot be found (using eg findkey, locate) in the lookup table. Well, until the table is closed and opened.
Any idea how to come by this? I need the 2nd table e.g. for my custom Data aware TTree component that loads nodes from the lookup table, but does the navigating on the edit table.
Regards - Hans
TORATable 'live view'
-
h.hasenack
- Posts: 48
- Joined: Tue 20 Jan 2009 12:35
I am trying to avoid changing my program logic as much as possible. Adding a refresh for each afterpoast/afterdelete event is rather tedious.Plash wrote:You should call the Refresh method for your lookup table after posting a record to the edit table.
Currently I use "locate" and "findkey" to locate the posted record. Does "Refresh" do something else but reloading the 'current' record? (like re-execute the entire query?)
Maybe the solution is in the using ChangeNotify component... (No luck so far)
UPDATE
I tried using SmartRefresh=True, but it causes an AV. Why? Do i need pro or dev version? I'm still using the evaluation version.
The Refresh method reloads the whole dataset. You can use the Locate method, and then RefreshRecord method to reload only record that was changed.
Using the TChangeNotification component is not recommended because it may require special server configuration to work normally.
SmartRefresh should work in Trial edition. We cannot reproduce an access violation. Please send to odac*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.
Using the TChangeNotification component is not recommended because it may require special server configuration to work normally.
SmartRefresh should work in Trial edition. We cannot reproduce an access violation. Please send to odac*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.
-
h.hasenack
- Posts: 48
- Joined: Tue 20 Jan 2009 12:35
Locate/findkey is unable to find a new record that has just been posted in the other instance of TOraTable. I guess this renders using refreshrecord for new records impossible. (not tested yet). RefreshRecord is probably only available for pre-existing records.You can use the Locate method, and then RefreshRecord method to reload only record that was changed.
Yes I noticed. changing the security didn't help.Using the TChangeNotification component is not recommended because it may require special server configuration to work normally.
I'll have to look into that one if I can find the time.Please send to odac*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.
Regards