[fdo-users] SHP modifications issue

Ytse bill_gfr at yahoo.fr
Tue Jan 23 05:31:29 EST 2007

Thank you for your answer, thank you also Robert for
your previous answer (I'm replying here to both your


For my knowledge, what make you think that the first
row of this file is deleted ? 
=> I don't see the '*' when I edit the dbf with and
hexadecimal editor (though I've been able to see them
earlier, if you refer to my first mail in this thread)

I've tested my code on 110 SHP files (2 completely
distinct class definition, though from the same french
public company) and it's always the same issue, FeatId
1 is ignored, so I guess there's either a bug in FDO's
ISelect/IReader interface or an issue with the SHP
structure of my files (but considering other viewers
can read them without troubles, I don't think so).
I've tried tracing the execution into the .cpp files
(I've added a breakpoint in mgISelectImp.cpp) but I'me
not confortable enough with FDO's internals to
understand what's happening.

Back to the first issue I had (I delete records using
FDO but am still able to see them in MGV/ArcView),
these rows should be physically deleted by the
compression algorithm but I can still see them (with
the '*', this time). I can't show you the code for
this as it's encapsulated within a couple classes, but
what could be wrong ? I've traced the code step by
step and I'm correctly closing the connection. 

Here's the method I use to delete each record

public bool Delete(string className, string filter) {
 int n = 0;
 try {
  IDelete del =
  if (!string.IsNullOrEmpty(filters))
  n = del.Execute();
 } catch {}
 return (n > 0);

I'm calling this once for each record to delete, then
I call this.connection.Close();
Am I forgetting something ?
I've tried calling this.connection.Flush() after each
edition (in my update / delete / insert methods) but
that doesn't change anything.

As a conclusion for this long mail, first of all I'd
like to thank you all again for your assistance. 
I'm still requiring your help and I'm willing to do
all I can to make this go the right way, if you need
additionnal code or files I can pack this in a zip.


--- Dan Stoica <dan.stoica at autodesk.com> a écrit :

> Hi,
> The file in question has the 1st record deleted.
> We decided that FDO should skip deleted records
> (that is, marked with an '*' in the .dbf).
> As said before, SHP is also doing compression on
> -edited- files. By getting rid entirely of the
> deleted records we fix this unpleasant compatibility
> issue with ESRI tools.
> Cheers,
> Dan.


Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 

More information about the fdo-users mailing list