Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2015

    Unanswered: Syntax error trying to UPDATE dbf file

    I have the following code which is supposed to connect to a .dbf file and then update (i'm using test values) - first I got the error that the Jet engine couldn't find the table "WV_region.dbf", so after searching, thought it might be something to do with the long filename. So i've now included code to get the DOS 8.3 file name, but I'm gettin the error "Syntax error in UPDATE statement."

    I'm about to throw the PC out of the window, so if anyone could help before I do that, I would be most grateful


  2. #2
    Join Date
    Nov 2002
    Provided Answers: 1
    I have the following code....
    Where is the code?

    So i've now included code
    Again - no code is shown

    Without seeing the code, I have to ask - what are you using to try to execute the code?
    * Foxpro/Visual Foxpro?
    long filenames or at least Long Path names are indeed a problem if you are using an OLD version of Foxpro, but that can be resolved with
    program modifications.
    * Or something else?

    Give us more information and we will be better able to assist you.

  3. #3
    Join Date
    May 2016
    Ultimate solution is directed to severe corruption in .dbf files Recovery Toolbox for DBF

    It is not necessary to rebuild a corrupt database. All corrupt databases can fixed in less than one minute.

    The solution is:

    Open database to main screen

    Copy the database but only one record(just pick a not recent record number at random; include "all", I usually name this database "FixMMDD" (( month Day))

    Open original database to mainscreen and append the FIXMMDD.dbf.

    You're done.

    Occassionally you may have to update indexes. Very rarely are any records lost and when it happens those few records are clearly garbled.

    I've been doing this for three years with no problems.

    If you have fields that increment you'll have to adjust that for your last valid value.

  4. #4
    Join Date
    Nov 2002
    Provided Answers: 1
    The error message: "Syntax error in UPDATE statement." is not an indication of a problem with the data table - thereby negating the need for "update indexes" or for using a tool like: Recovery Toolbox for DBF for 'fixing' of the data table.

    Instead that error message, as indicated, suggests a problem with the code you have written in your UPDATE code.

    Note that the SQL UPDATE code must use the syntax of the 'backend' data table, not necessarily the same syntax for the language of the program. They MIGHT be the same, but they might be different.

    If you would post the SQL UPDATE code, then we could look it over to see what might be wrong.

    Good Luck

Posting Permissions

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