Results 1 to 6 of 6

Thread: .MDB to .DBF

  1. #1
    Join Date
    Oct 2005
    Posts
    2

    Unanswered: .MDB to .DBF

    Hi,

    I'm looking for a way to convert .MDB files to .DBF. It doesn't even have to convert, export would work to.
    This is in a windows setup, though I also have a linux box if that is where the solution may lie.

    We have an online shop which dumps orders into a .mdb file. We download this file once daily, open it, delete where field is null, export it to a .dbf, then append it to an existing .dbf using foxpro.

    We would like to set this up to be done automatically, so I have three .bat files. First one downloads the .mdb file, and uploads a blank one. The second one runs a .asp page which does "DELETE FROM onlorder WHERE ont_ouritm IS NULL", and the third one copies this to the directory where foxpro can pick it up.

    However, the guy who setup the system told me that foxpro can't open .mdb files, which is why we opened the .mdb and exported it to .dbf previously.

    Is there a way to set the convert/export up to run as a batch, or an easier way to do all of this?

    Thank you much,
    Kyle Johnson
    Hanover Uniform
    1-800-541-9709 x123

  2. #2
    Join Date
    Dec 2003
    Posts
    104
    Fox can't open .MDB tables natively, but you can use an ODBC connection.

    I think you will have to use VFP in order to do it though. I don't think you will be able to use Foxpro 2.6 or older because I don't know of a suitable 16-32 bit ODBC driver which will work with it.

    In fact, you could use VFP to download a file, upload a blank, query the downloaded file either ignoring nulls or deleting them after the query, then append the results to a native fox table.
    DSummZZZ

    Even more Fox stuff at
    www.davesummers.net/foxprolinks.htm

  3. #3
    Join Date
    Oct 2005
    Posts
    2
    "VFP" what is that?
    Personally, I've barely used foxpro. The IT guy who has been here for 20+ years set everything up sometime back then, using foxpro.

  4. #4
    Join Date
    Dec 2003
    Posts
    104
    Sorry, when you said you had used FoxPro, I assumed you knew about Visual FoxPro.

    I think you would find it well worth the price to invest in.
    There are many useful features you could use for updating, upgrading and automating your current system.
    DSummZZZ

    Even more Fox stuff at
    www.davesummers.net/foxprolinks.htm

  5. #5
    Join Date
    Oct 2005
    Posts
    2

    Export to Excel and then DBF

    You can export tables from .mdb file to sheets in Excel.
    On time exported in a sheet, you can choose Save AS and choose dbf.file type.

    Have a nice day!

  6. #6
    Join Date
    Nov 2005
    Posts
    4

    Thumbs up ODBC works very well...

    I've already done this for another client of mine. They had 3rd party Access-based system from which they wanted data automatically pulled into a system I wrote for them in Visual Foxpro. Used the standard Access driver that comes with Windows and voila, there's the data. You can compile your Foxpro program so that it's an EXE callable by the batch files...

Posting Permissions

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