Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error on ODBC insert

117 views
Skip to first unread message

Marco

unread,
Jul 26, 2022, 5:54:13 AM7/26/22
to
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

dlzc

unread,
Jul 26, 2022, 11:57:49 AM7/26/22
to
Dear Marco:
"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

Marco

unread,
Jul 26, 2022, 12:26:49 PM7/26/22
to
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.

dlzc

unread,
Jul 26, 2022, 3:34:58 PM7/26/22
to
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

Enrico Maria Giordano

unread,
Jul 26, 2022, 3:44:32 PM7/26/22
to
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

dlzc

unread,
Jul 27, 2022, 11:45:55 AM7/27/22
to
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
0 new messages