Results 1 to 5 of 5

Thread: Packing a dbf file in VB?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    69

    Question

    Hi guys ...here is a challange...

    I have the need to manipulate some dbf files from within my
    VB app. One requirement is to pack the dbf so as to purge the records marked for deletion...any suggestion on if and how to go about this.


    Regards


    Gerard

  2. #2
    Guest

    Question Just a question at this stage

    What is a dbf file?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    69
    Sorry ...

    What I mean by a dbf file

    Is say a dBAse III - V file; FoxPro file, Clipper.
    The routine my client has now is to delete the contents of these say foxPro file by an action query in Access ...but this on flags them for deletion doesn't actually purge the (Pack) the phyiscal contents.

    Any ideas...I haven't done much with FoxPro one idea is to write something in foxPro and call that app from within VB...don't really want to start learning a new language at this stage, just trying to come to grip with VB..

    Gerard

  4. #4
    Guest

    Thumbs up Not sure but try this as a next step

    1. Backup the database.

    2. Go to Addins->Database thingy.

    3. Try opening a dbase file

    4. See if the compact option is still available in the menu

    5. Execute it, then check flagged records are deleted. (There is an option to show flagged records in dBase so persumably same in Foxpro)

    6. If this works, see if you can connect the db programmatically in vb then look for the compact property in the db variable.

    See how you go and report back, if in trouble and the db is not proprietry and not too large email it over and l will go through the process above and get back to you.

    Hope that helps.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    69

    Question

    Thanks for your response Jethro!

    Now side tacking for a moment...using ADO what is the best method to handel say an udate query based upon more then one separate DBase table file. For example this is the existing SQL Statement in Access:

    UPDATE MROTBLP INNER JOIN NAMETBL1 ON MROTBLP.MRN = NAMETBL1.MRN SET NAMETBL1.WARDCODE = [MROTBLP].[ward];

    I need obviously to setup a connection to both tables then what?

    Thanks

    I will try out that packing idea soon...

    Gerard

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width