ArcSDE Query (Stale/Refresh)

2705
1
Jump to solution
02-21-2013 08:13 AM
Highlighted
Occasional Contributor
I have a timer which asynchronously (via a WebService) queries a Table (Table1) in SDE every 30 seconds. I have another WebService component which makes entries into Table1 every 15 seconds. The problem is, once the first query on Table1 is made, it seems to "lock it" and does not detect new rows inserted by the second component. So before the first entry is made, my row count is 5. After a row is inserted, my count is still 5. After another row is inserted, my count remains at 5. If I restart the program, my row count is now 7 and the same process is repeated.

Inspecting the data through Catalog I am able to see the new entries being made every 15 seconds but only after I right click on the database and do a Refresh. I suspect I need to do something similar in C# but am unsure how (yet).

I have tried to release all components using System.Runtime.InteropServices.Marshal.ReleaseComObject() to no avail.

IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)ws; IFeatureClass myFC = featureWorkspace.OpenFeatureClass("Table0"); ITable myTBL = featureWorkspace.OpenTable("Table1"); IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)ws;


I get some info from myFC and use that to query myTBL. But again, the problem is after I query the Table1, those values seem to get "cached" and the same values are returned every other query attempt until I restart the program.

Specs:
ArcGIS Server 9.3.1
SQL Server 2005

Thanks,
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Occasional Contributor
After some tinkering, I have reduced the problem down to the fact that the call to get new rows is being made from a WebService. I took the WS code and placed it into my project and everything works fine. I am now trying to figure out why the WS is causing problem even though I have (I think) removed all the cache attributes from it.

View solution in original post

Reply
0 Kudos
1 Reply
Highlighted
Occasional Contributor
After some tinkering, I have reduced the problem down to the fact that the call to get new rows is being made from a WebService. I took the WS code and placed it into my project and everything works fine. I am now trying to figure out why the WS is causing problem even though I have (I think) removed all the cache attributes from it.

View solution in original post

Reply
0 Kudos