Q&A - Question Refresh SQL layer Question FabD asked on September 30, 2016, keyword: Developer Kernel In my C# application, I have some layers that takes the data from a Postgres/Postgis database (TGIS_LayerSqlPgisLibpq). Now I edit the tables contents (data and geometry) programmatically using a query (using the Npgsql library). What's the more efficient way to update the layer to reflect the data changes? Thank you very much. Answers Artur Redzko (TatukGIS) replied September 29, 2016 You can either reopen a layer or try ResetDataset method. FabD replied September 30, 2016 Ok. ResetDataSet works, but it seems that the view doesn't update its extent (e.g. if the layer "grows" and exceeds the view bounds I can't pan or zoom out to see the whole layer). ReOpen works better, the view updates its extent. After calling TGIS_LayerSqlPgisLibpq.ReOpen(), you must also call TGIS_ViewerWnd.Update() to update the view. Artur Redzko (TatukGIS) replied September 30, 2016 Yes, ResetDataSet tells the layer to execute a new query instead of using cache, but doesn't change the layer properties. ReOpen reinitiates the layer. If you would like to answer the question please Sign In. * * Stay signed in on this computer Please review our recent Privacy Policy.If you have any questions or requests, please contact us. Forgotten password Rules The Questions and Answers (Q & A) is intended to provide a means of communication between TatukGIS customers. Licensed users (with active maintenance play) of TatukGIS products may contribute to the Q & A content. Read-only access is available to anyone. Keep the content positive and professional. Be courteous to others by posting information when a question or issue asked on the Q & A is answered or resolved by other means (such as with help from TatukGIS technical support). Offer others at least a hint how the posted question was answered or the issue was resolved. The Q & A is not a replacement for TatukGIS technical support. TatukGIS team may or may not regularly follow or contribute content.