DBF FILE STRUCTURE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JimmyKoolPantz

    #1

    DBF FILE STRUCTURE

    IDE: VB2005
    FILE TYPE: DBF5

    I appoligize if I am posting in the wrong group.

    Question: Is there a position in the dbf file structure that will
    allow me to delete a field, such as, the way the dbf file structure
    has a record deletion flag? I have wrote a class for reading and
    writing dbf files but I recently came across the need to delete fields
    quickly. I'm currently reading the records into a dataset and then
    writing them to a dbf file but, looking for a quicker solution. What
    I thought was possible appears not to be, I wanted to copy the dbf
    file, rename it, and then update a field deletion flag, and then pack
    it.

    The utility I am writing allows the users to select the fields they
    want to keep, then my utility creates a script of only the fields they
    have selected.

    Any suggestions would greatly be appreciated.

    Thanks!
  • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

    #2
    RE: DBF FILE STRUCTURE



    "JimmyKoolPantz " wrote:
    IDE: VB2005
    FILE TYPE: DBF5
    >
    I appoligize if I am posting in the wrong group.
    >
    Question: Is there a position in the dbf file structure that will
    allow me to delete a field, such as, the way the dbf file structure
    has a record deletion flag? I have wrote a class for reading and
    writing dbf files but I recently came across the need to delete fields
    quickly. I'm currently reading the records into a dataset and then
    writing them to a dbf file but, looking for a quicker solution. What
    I thought was possible appears not to be, I wanted to copy the dbf
    file, rename it, and then update a field deletion flag, and then pack
    it.
    >
    The utility I am writing allows the users to select the fields they
    want to keep, then my utility creates a script of only the fields they
    have selected.
    >
    Any suggestions would greatly be appreciated.
    >
    Thanks!
    >
    Do you mean you are directly reading and writting bytes of the .dbf
    formatted file? This post brings back bad memories! A good source of info
    on this is http://www.wotsit.org/. It does not look like marking a field
    similar to rows as deleted exists.

    Why not use the OleDbConnection and associated classes?




    Comment

    • JimmyKoolPantz

      #3
      Re: DBF FILE STRUCTURE

      On Dec 4, 8:46 pm, Family Tree Mike
      <FamilyTreeM... @discussions.mi crosoft.comwrot e:
      "JimmyKoolPantz " wrote:
      IDE: VB2005
      FILE TYPE: DBF5
      >
      I appoligize if I am posting in the wrong group.
      >
      Question: Is there a position in the dbf file structure that will
      allow me to delete a field, such as, the way the dbf file structure
      has a record deletion flag? I have wrote a class for reading and
      writing dbf files but I recently came across the need to delete fields
      quickly. I'm currently reading the records into a dataset and then
      writing them to a dbf file but, looking for a quicker solution. What
      I thought was possible appears not to be, I wanted to copy the dbf
      file, rename it, and then update a field deletion flag, and then pack
      it.
      >
      The utility I am writing allows the users to select the fields they
      want to keep, then my utility creates a script of only the fields they
      have selected.
      >
      Any suggestions would greatly be appreciated.
      >
      Thanks!
      >
      Do you mean you are directly reading and writting bytes of the .dbf
      formatted file? This post brings back bad memories! A good source of info
      on this ishttp://www.wotsit.org/. It does not look like marking a field
      similar to rows as deleted exists.
      >
      Why not use the OleDbConnection and associated classes?- Hide quoted text -
      >
      - Show quoted text -
      Yes, I am reading and writing the bytes, which is no longer an issue
      (brings back bad memories to me also) I'm just searching for the
      fastest way regenerate a dbf that only has the fields that the user
      selects. I like the speed of reading and writing in bytes and was
      hoping I could remove fields in a similiar way I remove records. We
      deal with files that have many fields an many records, so speed is
      currently the issue. The function I have now works but not so good
      with large files an was hoping I could find an alternitive way to do
      than read it, store it in a dataset and then write it back out ot a
      dbf. I might just have to reavaluate my code to see where its taking
      the longest to process. Thanks for your response.

      Comment

      • Ivica Muruzovic

        #4
        Re: DBF FILE STRUCTURE

        Try using Advantage .NET Data Provider 8.1 you can found it on
        www.advantagedatabase.com under downloads section


        On Tue, 4 Dec 2007 17:06:03 -0800 (PST), JimmyKoolPantz
        <kohl.mike@gmai l.comwrote:
        >IDE: VB2005
        >FILE TYPE: DBF5
        >
        >I appoligize if I am posting in the wrong group.
        >
        >Question: Is there a position in the dbf file structure that will
        >allow me to delete a field, such as, the way the dbf file structure
        >has a record deletion flag? I have wrote a class for reading and
        >writing dbf files but I recently came across the need to delete fields
        >quickly. I'm currently reading the records into a dataset and then
        >writing them to a dbf file but, looking for a quicker solution. What
        >I thought was possible appears not to be, I wanted to copy the dbf
        >file, rename it, and then update a field deletion flag, and then pack
        >it.
        >
        >The utility I am writing allows the users to select the fields they
        >want to keep, then my utility creates a script of only the fields they
        >have selected.
        >
        >Any suggestions would greatly be appreciated.
        >
        >Thanks!

        Comment

        • JimmyKoolPantz

          #5
          Re: DBF FILE STRUCTURE

          I think I might try and query the dbf file to remove the fields. This
          was not an option when creating the reader and writer because of the
          sluggish results. But, it might work in this case, because all I want
          to do is alter the table fields.

          Comment

          Working...