Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The REUERY() Function return value 1

Status
Not open for further replies.

Bobriver7

Programmer
Mar 27, 2010
8
JO
Hi
I have a parameterized remote view on which I use the REQUERY() function. it works fine and retrieves the records normally but when I run the system on the client's computer it does not fetch any records.same data set, same version of vfp, SQL and everything.

I checked the return value of the requery() command and it returns (-1) Minus one but nothing in the HELP about -1.
Please help
 
Hi Bob,

I vaguely remember seeing this before. I think it might be because the view's FetchAsNeeded property is .T. You can check that by using DBGETPROP() to retrieve the value of FetchAsNeeded. If it's .T., try setting it to .F. and seeing if that solves the problem.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Thank you mike.
the FetchAsNeeded property is .F. and it is stated clearly in the SQL statement when I (VIEW SQL) of the remote view on the view designer.
to make sure of this i issued the requery statements as follows:

MESSAGEBOX(REQUERY("ITDLIST"))
MESSAGEBOX(CURSORGETPROP("FetchAsNeeded","itdlist"))

I get (-1) in the first message and (.f.) in the second.
this is frustrating because on my PC it works fine but on the client PC I get no records with a -1 returned value for the requery() function.

Bob
 
Bob,

Well, I wasn't sure about FetchAsNeeded. As I mentioned, I was relying on a vague memory.

Have you tried putting an AERROR() immediately after the REQUERY()? That might give you some more information.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Hi mike

as I mentioned before, the problem appears on the client's computers and not on the development PC.
my client is in a remote location and I have to test this on their location and I am waiting for them to arrange for this visit. I couldn't get somebody there to do the test for me because of some (security concerns). I'll get back to you soon.

Thanks for follow up.

Bob
 
yes Mike
thank you for the AERROR idea , it helped to expose the error which was a connection busy error.
the solution was that I had to set the fetch size to -1 for all the other views. it's okay for this case because those views contain limited number of records.

I don't know why I didn't use the AERROR before, maybe because I thought it doesn't explain the ODBC errors sufficiently. so thank you for the help

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top