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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random Printing Locking of Computer in 2.6a

Status
Not open for further replies.

Jadden200

Programmer
Mar 10, 2005
8
US
Hello all. I have a customer that uses a 2.6a application that is installed on Windows XP machines and is networked to a Server. The problem is not client related because I have downloaded his data and it is happening on my machine as well.

The Problem: The computer will lock up on certain records even new ones when printing reports. This will happen on different reports and on different records. The computer will just hang there and you have to Ctrl/Alt/Del to to completely shut down the program. What makes it worse is it happens randomly like with every fourth record or so.

They have been using the same executable before and had no problems. The problems have just started happening and no changes have been made to the computers.

I have reindexed, packed, deleted the config.fpw file, set resource off in the app, ran FoxFix, ran FptFix, and anything I could think of to do.

But it is still happening on his network and on my machine.

What is going on?

Please help!!

Thanks in advance.
 
You say you reindexed. Did you try deleting the indexes and recreating them?

Tamar
 
Thank you much. I forgot about doing that. I just did and things seem to be going alot smoother now. I do have a few choice records that will lock up but those I think have become corrupt.

I have been entering cases on his test data with no problems, so far.

Usually deleting the indexes is the first thing I do, I just have not had this happen in awhile.

Thanks again!
 
Jadden,
do you use UDF() in report ?
Unexpected value in source data may cause endless loop in your function...
Tesar

 
Thanks for reply Tesar. I do not use UDF's. I was not even familiar with that term but now know it is a 'User Defined Function'. My code for a report goes basically something like this:

REPORT FORM warrant NEXT 1 &prt_opt NOCONSOLE

I had the same problem today with another one of my customers and the only thing that cured her database was packing it.

So I am going to write an all-in-one external utility program for my application that will:

Delete the indexes
Recreate the indexes
Pack all the databases
And somehow delete all the Foxuser databases
And maybe at the same time run all DBF repair utilities.

Thanks again for your reply. The customer in my first post was running fine this day until the very end and it locked up on a record while printing. And it was a new record they entered, after they have been entering fine all day. Go figure. I wonder why?

Anyway, maybe this 'all-in-one' program will work.

I am guessing also that multiple foxuser.dbf's over the network is causing problems too.

Thanks again
 
Just wanted to add something to that my last post. Sorry, did not see an Edit button to edit my post.

But I think I do use UDF's all the time. These I assume are function's that I create on the report itself.

However, There are no UDF's on any of the reports that were locking up. There are just straight fields from the database on these reports.

I also wanted to say that I download both database from Customer1 and Customer2. Customer2 locked up on my first attempt to print anything, until I packed. Now she is doing well(She is not on a network). Customer1 I may have a few more problems with. I hope not.

Thanks again.
 
Jadden,
as packing in fact remove deleted records and
move file to other disc place,
may be is data error in deleted record in origin place.
(for example nonnumeric character in numeric field,
result virus activity...)
Check your "on error" command - unexpected error code
(do you have in error routine "otherwise" case ?)
Tesar
 
Thanks again, Tesar. Very interesting thinking here. I thought that if you opened up a database exclusive and then PACK, that all the bad stuff would simply disappear.

Are you telling me that the bad stuff will remain somewhere in a temp file? Maybe in the Foxuser.dbf? I would really love to know. Here is one of my procedures for packing the Main database:

PROCEDURE PACK

WAIT WINDOW 'Packing case file ... please wait ' NOWAIT

SET EXCLUSIVE ON
USE wc_case.dbf EXCLUSIVE
PACK

CLOSE DATABASE

WAIT WINDOW 'Packing completed ... ' TIMEOUT 2


Also you raised a very interesting point about the ON ERROR command. I have no CASE statements, here is what I have:

ON ERROR DO ERRHAND WITH ERROR(), MESSAGE(), ;
MESSAGE(1),PROGRAM(),LINENO()

I believe ERRHAND is a program that came with 2.6

However, It seems that I at least need to put an OTHERWISE statement in there somewhere, so at the very least it will not let the app hang.

I do appreciate all the advice.
 
Jadden,
as i have only 2.0, i know no about "errhand".
Only for explanation:
My point warn possibly return from error routine:
if i use "retry" to return from it,
and forgot before exclude error for example 9 or other
(Data type mismatch...),
endless loop may simulate freezing computer.
Tesar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top