Обсуждение: Visual FoxPro 9 ODBC errors
I am writing an application in Visual Foxpro 9 (running on Windows 2000) but I get errors when VFP9 tries to write data to my Postgresql server (Linux Redhat 9). I know the syntax on the insert statement is good because I can run the statement in pgAdmin and the row is created without problems. I searched the mailing lists and I see messages about errors with VFP9 but I can't read them, I believe they're in Spanish.
I know there are Visual FoxPro developers on this list. Is anyone else having problems with 9? If there are problems with VFP9 are the problems in VFP8 as well? I am trying to build this application in the most current version of VFP possible but it must be compatible with Postgresql.
Please reply to me as well as the list, I get the digest version.
Thank you,
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297
This e-mail message and any attachment(s) are for the sole use of the intended recipient(s) and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient(s), please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachment(s) to the original message.
"Is anyone else having problems with 9? " I use VFP 9 + Postgres 8.1 on XP + 105 version of Postgres Unicode ODBC driver without problems. Andrus.
2006/1/3, MargaretGillon@chromalloy.com <MargaretGillon@chromalloy.com>:
>"Alejandro D. Burne" <alejandro.dburne@gmail.com> wrote on 01/01/2006 04:37:10 PM:
> 2005/12/30, MargaretGillon@chromalloy.com < MargaretGillon@chromalloy.com>:I am using Postgresql ODBC driver version 8.00.01.02
>
> I am writing an application in Visual Foxpro 9 (running on Windows
> 2000) but I get errors when VFP9 tries to write data to my
> Postgresql server (Linux Redhat 9). I know the syntax on the insert
> statement is good because I can run the statement in pgAdmin and the
> row is created without problems. I searched the mailing lists and I
> see messages about errors with VFP9 but I can't read them, I believe
> they're in Spanish.
>
> I know there are Visual FoxPro developers on this list. Is anyone
> else having problems with 9? If there are problems with VFP9 are the
> problems in VFP8 as well? I am trying to build this application in
> the most current version of VFP possible but it must be compatible
> with Postgresql.
>
> Please reply to me as well as the list, I get the digest version.
>
> Thank you,
>
>
> Hi, I'm a vfp (6.0) developer, what's wrong with vfp and postgres?
> What kind of connection sqldirect / sqlpasstrough?
> ODBC Version?
>
> Alejandro
Connection is with SQLCONNECT command, then SQLEXEC statements. I was able to use this ODBC driver with Visual Foxpro 7 with no problems. That is why I am wondering if something changed with version 9, and if the change was between 7 and 8 or between 8 and 9.
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297
Ok, I can't test vfp 9 right now; but you can't connect? or you can't query?
With "? message()" after sqlexec you can see message error. Tell us more.
Alejandro
> 2006/1/3, MargaretGillon@chromalloy.com <MargaretGillon@chromalloy.com>:
>
> >"Alejandro D. Burne" <alejandro.dburne@gmail.com> wrote on
> 01/01/2006 04:37:10 PM:
>
>
> > 2005/12/30, MargaretGillon@chromalloy.com < MargaretGillon@chromalloy.com>:
>
> >
> > I am writing an application in Visual Foxpro 9 (running on Windows
> > 2000) but I get errors when VFP9 tries to write data to my
> > Postgresql server (Linux Redhat 9). I know the syntax on the insert
> > statement is good because I can run the statement in pgAdmin and the
> > row is created without problems. I searched the mailing lists and I
> > see messages about errors with VFP9 but I can't read them, I believe
> > they're in Spanish.
> >
> > I know there are Visual FoxPro developers on this list. Is anyone
> > else having problems with 9? If there are problems with VFP9 are the
> > problems in VFP8 as well? I am trying to build this application in
> > the most current version of VFP possible but it must be compatible
> > with Postgresql.
> >
> > Please reply to me as well as the list, I get the digest version.
> >
> > Thank you,
> >
> >
> > Hi, I'm a vfp (6.0) developer, what's wrong with vfp and postgres?
> > What kind of connection sqldirect / sqlpasstrough?
> > ODBC Version?
> >
> > Alejandro
> I am using Postgresql ODBC driver version 8.00.01.02
> Connection is with SQLCONNECT command, then SQLEXEC statements. I
> was able to use this ODBC driver with Visual Foxpro 7 with no
> problems. That is why I am wondering if something changed with
> version 9, and if the change was between 7 and 8 or between 8 and 9.
>
>
> *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> *** *** ***
> Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297
>
> Ok, I can't test vfp 9 right now; but you can't connect? or you can't query?
> With "? message()" after sqlexec you can see message error. Tell us more.
>
> Alejandro
I can connect and I can query, what I can't do is write. In VFP7 I could update with no problem. Any update commands sent from VFP9 fail.
Margaret Gillon
2006/1/3, MargaretGillon@chromalloy.com <MargaretGillon@chromalloy.com>:
Please, send message error to help. Alejandro
I can connect and I can query, what I can't do is write. In VFP7 I could update with no problem. Any update commands sent from VFP9 fail.
> 2006/1/3, MargaretGillon@chromalloy.com < MargaretGillon@chromalloy.com>:
>
> >"Alejandro D. Burne" <alejandro.dburne@gmail.com> wrote on
> 01/01/2006 04:37:10 PM:
>
>
> > 2005/12/30, MargaretGillon@chromalloy.com < MargaretGillon@chromalloy.com>:
>
> >
> > I am writing an application in Visual Foxpro 9 (running on Windows
> > 2000) but I get errors when VFP9 tries to write data to my
> > Postgresql server (Linux Redhat 9). I know the syntax on the insert
> > statement is good because I can run the statement in pgAdmin and the
> > row is created without problems. I searched the mailing lists and I
> > see messages about errors with VFP9 but I can't read them, I believe
> > they're in Spanish.
> >
> > I know there are Visual FoxPro developers on this list. Is anyone
> > else having problems with 9? If there are problems with VFP9 are the
> > problems in VFP8 as well? I am trying to build this application in
> > the most current version of VFP possible but it must be compatible
> > with Postgresql.
> >
> > Please reply to me as well as the list, I get the digest version.
> >
> > Thank you,
> >
> >
> > Hi, I'm a vfp (6.0) developer, what's wrong with vfp and postgres?
> > What kind of connection sqldirect / sqlpasstrough?
> > ODBC Version?
> >
> > Alejandro
> I am using Postgresql ODBC driver version 8.00.01.02
> Connection is with SQLCONNECT command, then SQLEXEC statements. I
> was able to use this ODBC driver with Visual Foxpro 7 with no
> problems. That is why I am wondering if something changed with
> version 9, and if the change was between 7 and 8 or between 8 and 9.
>
>
> *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> *** *** ***
> Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297
>
> Ok, I can't test vfp 9 right now; but you can't connect? or you can't query?
> With "? message()" after sqlexec you can see message error. Tell us more.
>
> Alejandro
Margaret Gillon
Please, send message error to help. Alejandro
I see that one can add a new column to an existing table. The documentation was not clear on how efficient this operation would be. Does PostgreSQL make a copy of the entire table when adding a new column? Or does it simply use extra space in the data blocks to add the new column? __________________________________________ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com
Alejandro,
I cannot build the list of errors because I am on another project right now that is rush. I will trace and post the error(s) as soon as I can.
Margaret.
P G <pgress5@yahoo.com> writes: > I see that one can add a new column to an existing > table. The documentation was not clear on how > efficient this operation would be. > Does PostgreSQL make a copy of the entire table when > adding a new column? Or does it simply use extra > space in the data blocks to add the new column? If the new column has no default expression (ie, default null) then adding a column doesn't touch the table at all, only some catalog entries. Inserting data into the column is expensive, of course, since you have to update every row in the table to put it there. This is not different from any other UPDATE operation. regards, tom lane
There is an ODBC problem with Visual Foxpro 9. According to a Visual FoxPro maillist:
Since VFP caches a common statement handle that it reuses, it has to call SQLFreeStmt(SQL_UNBIND) and SQLFreeStmt(SQL_RESET_PARAMS) to make sure the cached statement handle is in a cleared state before reusing it. VFP indeed calls these functions when all goes well, but when an error occurs in SQLExecuteDirect it just calls SQLCancel and then returns from SQLEXEC...... At least for me this is a bug in VFP, which is caused by the fact that it caches a common statement handle but doesn't reset it correctly when an error occurs.
A thread does exist for the problem on the pgsql-odbc list under
Subject: Re: [ODBC] Access violation C5 error on Visual FoxPro SQLEXEC() call after error
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297
This e-mail message and any attachment(s) are for the sole use of the intended recipient(s) and may contain proprietary and/or confidential information which may be privileged or otherwise protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient(s), please contact the sender by reply email and destroy the original message and any copies of the message as well as any attachment(s) to the original message.
Thisis fixed this in December 2005. Recent development snapshot does not have this problem. This problem occurs only when Postgres returns error and VFP application executes next statement i.e. in rare cases. Andrus. >There is an ODBC problem with Visual Foxpro 9. According to a Visual >FoxPro maillist: >Since VFP caches a common statement handle that it reuses, it has to call >SQLFreeStmt(SQL_UNBIND) and SQLFreeStmt(SQL_RESET_PARAMS) to make sure the >cached statement handle is in a cleared state before reusing it. VFP indeed >calls these functions when all goes well, but when an error occurs in >SQLExecuteDirect it just calls SQLCancel and then returns from >SQLEXEC...... At least for me this is a bug in VFP, which is caused by the >fact that it caches a common statement handle but doesn't reset it >correctly when an error occurs. >A thread does exist for the problem on the pgsql-odbc list under Subject: Re: [ODBC] Access violation C5 error on Visual FoxPro SQLEXEC() call after error