Smart questions
Smart answers
Smart people
Join Tek-Tips Forums
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

keithchansc (Programmer) (OP)
28 Oct 08 13:20
I find a problem when I select all records from a large table, the process will stop randomly during record fetching (The record counter in the status bar stopped), but sometime it success. It seems only happen in my Notebook (ACER Aspire 6920) so far, but both VFP6 & VFP9 got the same problem.

My environment is:
- Windows XP SP3 (ODBC version 03.85.1132)
- ZoneAlarm version:7.0.483.000

Server side :
- SQL2000 / SQL2005

Any idea ?
OlafDoschke (Programmer)
28 Oct 08 14:14
do you reach the 2GB limit? What are the connection settings? Does it happen after a certain time always (Timeout?)

Bye, Olaf.

 
keithchansc (Programmer) (OP)
28 Oct 08 15:30
About 2GB limit : For the whole DB it's over 2GB, but I am connecting to a SQL server, not MSDE. For each table, it's within 2 GB

For the Connection settings, you mean the SQL connect string, or the SQLSETPROP() settings ?

About Timeout, seems not, as the whole table can be retrieved within one to two minutes in case it success. And the mention problem may appear in a few seconds just after the record fetching start.
myearwood (Programmer)
29 Oct 08 10:26
Is it the same query every time? I've seen one query fail when given a big date range, but work with a small one. Problem turned out to be a stored procedure called as a UDF. The stored procedure did it's own query, instead of being written as a join in the first query. So it timed out with the bigger date range. Wasn't a VFP problem at all.

Mike Yearwood - FoxPro MVP 2008
FoxRidge Software Inc.
www.foxridgesoftware.com
Toronto Ontario FoxPro User's Group:
http://www.foxridgesoftware.com/Home/TorontoOntarioFoxProUsersGroup/tabid/85/Default.aspx
 

jrbbldr (Programmer)
29 Oct 08 11:19
"the process will stop randomly during record fetching"

When the process stops, is any error message displayed?

One issue that I have encountered if I am using SQL Pass Through is to have the SQL Server time out and not tell VFP.  In that situation, no error message is displayed, but no records are returned which may or may not stop processing depending on the code's need for records.

In order to resolve that I had to change the QUERYTIMEOUT value of the VFP Database Connection to a larger value.

Good Luck,
JRB-Bldr
 
keithchansc (Programmer) (OP)
29 Oct 08 12:50
Mike,
Yes, the query is the same every time. I simply issue a "SELECT * FROM XXX"

JRB-Bldr,
There is a error message "Invalid cursor state", and then the SQL connection become disconnected.

Now I am tring to config a much larger PacketSize using SQLSETPROP(0,"PacketSize",1024*20), and it seems better now, my first test of 20 loops all passed. and I will keep on testing.
Do you think the problem may relate to buffer-overrun, in a fast CPU and fast network card ?
In case it is, then we may face the problem frequently in the future, although selecting a large set of records back into VFP is quite a rare case.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close