Results 1 to 5 of 5
  1. #1

    Create .dbf (foxpro 6) files with PHP

    Does anyone know if it's possible to take some submitted form data and create a .dbf file for fox pro 6 with PHP? Are they just comma delimited files with a .dbf extension, or is there more to them than that?

    Thanks,
    Jon
    Coding my way to oblivion.

  2. #2
    Join Date
    Oct 2004
    Posts
    104
    check out www.wotsit.org. There is nothing funky going on in the file, so writing a program to update the file should be easy.

    Are you going to be writing to the file from a multi user web site? You may want to think about creating one writer process.

  3. #3
    The file will simply be created with the form submission. There will be no editing or anything. And I'm not exactly sure what a writer process is, could you enlighten me?
    Coding my way to oblivion.

  4. #4
    Join Date
    Oct 2004
    Posts
    104
    If you have one database file that you want to keep adding records to, then the easiest way to write to that file is to have only one process do the writing otherwise, you will have to worry about locking the file every time a new process wants to add a record. In my experience, you will spend a lot more time getting this right (run time and coding time) than you will just using a single writer.

    I would do it with named pipes. I do not know how modular you would want to make it, but I would just do something simple like write a fixed size record to the named pipe that is being read by the writer process. The writer process would just block until it reads a record and then write it to the db file.

    You can get as fancy as you want, but I would keep it simple until you need more options.

  5. #5
    Well, the thing is, the form is creating a new .dbf file for each submission. It won't be adding to it once it's created. It's a one shot deal.
    Coding my way to oblivion.

Posting Permissions

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