• Error on ODBC insert

    From Marco@21:1/5 to All on Tue Jul 26 02:54:11 2022
    Hi, I have a dbfcdx file indexed using xharbour DBFCDX RDD set using the RDDSetDefault("DBFCDX") function.

    I can read and write to the file with a PHP\ODBC application using the Microsoft Visual FoxPro ODBC Driver version 6.01.8629.01 but when i try to do an insert on the database the ODBC driver return this error:

    [Microsoft][ODBC Visual FoxPro Driver]Feature is not available

    Does anyone know a solution?

    thanks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dlzc@21:1/5 to Marco on Tue Jul 26 08:57:48 2022
    Dear Marco:

    On Tuesday, July 26, 2022 at 2:54:13 AM UTC-7, Marco wrote:
    Hi, I have a dbfcdx file indexed using xharbour DBFCDX RDD set
    using the RDDSetDefault("DBFCDX") function.

    I can read and write to the file with a PHP\ODBC application
    using the Microsoft Visual FoxPro ODBC Driver version
    6.01.8629.01 but when i try to do an insert on the database
    the ODBC driver return this error:

    [Microsoft][ODBC Visual FoxPro Driver]Feature is not available

    Does anyone know a solution?

    "Insert" is not a method offered in DBFCDX, "append" is. See if that does not help.

    https://hackfox.github.io/section4/s4g058.html
    ... deprecated by anyone that has used it, I imagine.

    David A. Smith

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marco@21:1/5 to All on Tue Jul 26 09:26:48 2022
    Il giorno martedì 26 luglio 2022 alle 17:57:49 UTC+2 dlzc ha scritto:
    Dear Marco:
    On Tuesday, July 26, 2022 at 2:54:13 AM UTC-7, Marco wrote:
    Hi, I have a dbfcdx file indexed using xharbour DBFCDX RDD set
    using the RDDSetDefault("DBFCDX") function.

    I can read and write to the file with a PHP\ODBC application
    using the Microsoft Visual FoxPro ODBC Driver version
    6.01.8629.01 but when i try to do an insert on the database
    the ODBC driver return this error:

    [Microsoft][ODBC Visual FoxPro Driver]Feature is not available

    Does anyone know a solution?
    "Insert" is not a method offered in DBFCDX, "append" is. See if that does not help.

    https://hackfox.github.io/section4/s4g058.html
    ... deprecated by anyone that has used it, I imagine.

    David A. Smith

    Hi, the insert is done with PHP\ODBC not from xharbour, but the table and the index is created by xharbour. Any idea to prevent the error? Other query under PHP\ODBC on the same table doesnt give the error.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Maria Giordano@21:1/5 to All on Tue Jul 26 21:44:30 2022
    Il 26/07/2022 21:34, dlzc ha scritto:

    Since you appear to have missed my obvious advice: use APPEND [add to the end of the file], rather than INSERT [copy the existing file to a new file up to recno()-1, append this record, append the rest of the records from the original table, close the
    original table, delete the original table, reopen the indexes, reindex all the indexes, position the record pointer to recno()].

    INSERT is the SQL statement for APPEND, if I understood correctly what
    Marco is asking for.

    EMG

    http://www.emagsoftware.it
    http://www.emagsoftware.it/emgmusic
    http://www.emagsoftware.it/spectrum
    http://www.emagsoftware.it/tbosg

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dlzc@21:1/5 to Marco on Tue Jul 26 12:34:57 2022
    Dear Marco:

    On Tuesday, July 26, 2022 at 9:26:49 AM UTC-7, Marco wrote:
    ...
    Hi, the insert is done with PHP\ODBC not from xharbour, but
    the table and the index is created by xharbour. Any idea to
    prevent the error? Other query under PHP\ODBC on the same
    table doesnt give the error.

    Wrong newsgroup. You must use Foxpro resources, with Foxpro ODBC connection issues. When you do that, I think you will find out that the current ODBC code no longer supports what was a REALLY bad idea.

    Since you appear to have missed my obvious advice: use APPEND [add to the end of the file], rather than INSERT [copy the existing file to a new file up to recno()-1, append this record, append the rest of the records from the original table, close the
    original table, delete the original table, reopen the indexes, reindex all the indexes, position the record pointer to recno()].

    David A. Smith

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dlzc@21:1/5 to Enrico Maria Giordano on Wed Jul 27 08:45:53 2022
    Dear Enrico:

    On Tuesday, July 26, 2022 at 12:44:32 PM UTC-7, Enrico Maria Giordano wrote: ...
    INSERT is the SQL statement for APPEND, if I understood correctly what
    Marco is asking for.

    INSERT has a different meaning in FoxPro, than does APPEND. He is using that driver as he stated. Maybe that is what he meant to do, but... He also stated he was using DBFCDX, not SQLRDD.

    We'll see what he says.

    David A. Smith

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)