The ticket number is 4095.<br><br>Thanks<br>Ramiro<br><br><br><div class="gmail_quote">2011/5/24 Chaitanya kumar CH <span dir="ltr">&lt;<a href="http://chaitanya.ch">chaitanya.ch</a>@<a href="http://gmail.com">gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Ramiro,<br><br>You can use the OGRLayer::TestCapability() method to check write capability of a layer. However, there are going to be errors if another process accesses the files in the mean while.<br>
<br>When ogr2ogr is executed with -append, -overwrite or --update options, it should error out with the message &quot;Unable to open existing output datasource&quot; if a file cannot be opened to write. Can you raise a new ticket [1] describing this problem?<br>

<br>[1]: <a href="http://trac.osgeo.org/gdal/newticket" target="_blank">http://trac.osgeo.org/gdal/newticket</a><br><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, May 25, 2011 at 12:20 AM, Ramiro Gonzalez <span dir="ltr">&lt;<a href="mailto:ramirogonzalez@suremptec.com.ar" target="_blank">ramirogonzalez@suremptec.com.ar</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div class="h5">hello<br>
<br>I want to overwrite a shapefile using ogr(c++). If the dbf file in the destination shapefile is already open by anather program(exel), the operation fails in the middle and only the shp and shx files are updated.<br>


How could I check, using OGR, if the dbf(or any other file in the shapefile) is blocked before I overwrite it? <br><br>I tested this with &quot;ogr2ogr -overwrite destination source.shp&quot; and the same thing happens <br>



<br>
Thanks,<br><font color="#888888">
Ramiro
</font><br></div></div>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>Best regards,<br>
Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>
</font></blockquote></div><br>