Hi
I've got a VFP7 front end which talks to Microsoft SQL Server 2005.
I use sqlexec to pass queries to the database in order to produce report information.
Most of the time, this is fine, however, on occassion, sqlexec will return -1, and the results cursor is not created. If I run the query again straight away, then more often than not it returns the data (this is exactly the same query).
I re-created the issue on the command line. What I saw happening was that Foxpro was receiving data (I could tell this by the record count on the status bar), however, -1 would be returned, and a cursor would not be created.
This is extremely hard to reproduce as it does not occur consistently.
This problem occurs with large and small queries. It does seem to happen more when the SQL server is under load, but my timeouts are set to indefinite, and it seems strange that Foxpro does indicate that it is receiving data and then abruptly stops. In addition, Foxpro can sit for a good few seconds before returning -1, but it can also return -1 almost straight away.
The software is installed at 20+ sites, with different server hardware,etc, different customers.
Has anybody else encountered anything similar to this?
I do take this into account by the way, and re-query on failure,it's just not something that I would expect unless there was an error with the query, but there is not!
Thanks for your help.
Regards
Simon
I've got a VFP7 front end which talks to Microsoft SQL Server 2005.
I use sqlexec to pass queries to the database in order to produce report information.
Most of the time, this is fine, however, on occassion, sqlexec will return -1, and the results cursor is not created. If I run the query again straight away, then more often than not it returns the data (this is exactly the same query).
I re-created the issue on the command line. What I saw happening was that Foxpro was receiving data (I could tell this by the record count on the status bar), however, -1 would be returned, and a cursor would not be created.
This is extremely hard to reproduce as it does not occur consistently.
This problem occurs with large and small queries. It does seem to happen more when the SQL server is under load, but my timeouts are set to indefinite, and it seems strange that Foxpro does indicate that it is receiving data and then abruptly stops. In addition, Foxpro can sit for a good few seconds before returning -1, but it can also return -1 almost straight away.
The software is installed at 20+ sites, with different server hardware,etc, different customers.
Has anybody else encountered anything similar to this?
I do take this into account by the way, and re-query on failure,it's just not something that I would expect unless there was an error with the query, but there is not!
Thanks for your help.
Regards
Simon