TEMP variable

TEMP variable

Postby asito » Mon Jul 09, 2007 6:41 pm

I have an application that has 3 big modules (3 diferent exes) that share several files on a LAN. It has been running for a couple of years now. I upgraded to FW 7.01 about 6 months ago. About a month ago we began to get an error when trying to issue rerport previews:

Could not create temporary file C:\TEMP696322880.wmf
Please check your free space.......
Followed for: check your enviromental variables.....

Drive C has several gbs free. SET CLIPPER is set to 90, HandleCount is set to 90 (I just increased them).
It began on 1 pc, but now the error is on 3 of them.
I get no errors on my PC.

Does anyone know how to solve this problem?

Thanks
asito
 
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México

Postby asito » Tue Jul 10, 2007 10:55 pm

I solved the problem increasing CLIPPER=F120 (for now).
The weird thing is that the application had run for a couple of years with F60. There were no changes on the client side, same NT os.
The only thing that changed was the compiler and some minor modifications to the app, but it gave no problems for 4 or 5 months.
asito
 
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México

Postby Antonio Linares » Wed Jul 11, 2007 7:39 am

You should consider to upgrade your application to 32 bits using FWH and Harbour/xharbour as such problem does not exist on 32 bits
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby asito » Mon Jul 16, 2007 8:51 pm

Gracias Antonio,

I will consider changing to FWH, but I can't do it right now because I'm developing 5 other applications and the change would impact me severely on the delivery time (I don´t have any problems with the other applications).

It worked fine for several days with CLIPPER=F120 but today it gave the error again, any other suggestion in the meantime?

Saludos
Andres
asito
 
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México

Postby Gale FORd » Mon Jul 16, 2007 9:24 pm

Isn't there a limit to the length of the filename in clipper?
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Postby James Bott » Mon Jul 16, 2007 9:46 pm

Do all the users have the rights to create files in the root directory?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby asito » Tue Jul 17, 2007 12:03 am

Hi James,

Yes. The program is trying to create a temp file in C:\TEMP. They have administrator rights on their pc's.
Last week was running fine with the same configuration.

Regards
Andres

Gale
Yes there is the same limit as in DOS 8 chars. But what does it have to do with it?
asito
 
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México

Postby James Bott » Tue Jul 17, 2007 5:49 am

Andres,

>Yes there is the same limit as in DOS 8 chars. But what does it have to do with it?

>Could not create temporary file C:\TEMP696322880.wmf

As you can see the filename you showed is greater than 8 chars, so perhaps there is already a file with the same first 8 characters. This may be a FW/Clipper bug--I don't know. When FW is running as 16bit it should only be generating temp filenames that are 8 characters long.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Tue Jul 17, 2007 6:38 am

In source\function\filename.prg change function cTempFile() to return this:

return LFN2SFN( cFileName )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby hua » Wed Jul 18, 2007 4:09 am

In source\function\filename.prg change function cTempFile() to return this:

return LFN2SFN( cFileName )


Pardon me if I make the wrong conclusion here, but wouldn't placing lfn2sfn() here would result in cTempfile() to always return a null string since cFileName is yet to be created?
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Postby Antonio Linares » Wed Jul 18, 2007 6:49 am

cFileName is already created and the function returns it.

If we return LFN2SFN() then we use it in 8.3 name format
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby asito » Wed Jul 18, 2007 4:05 pm

Hola Antonio,

I tried LFN2SFN() and I began to get the same error on my stand alone pc (it worked fine there before).
What I did and seems to work fine is:

while File( cFileName := ( cPath + LTrim( Str( GetTickCount(),8 ) ) + cExtension ) )

I have to test it some more on my client's lan and will let you all know

Thanks

I changed the while to verify that the file does not exist before returning the name. It seems to work fine too, but I don't know if it can have consecuenses on other funtcions.

lTkt := .t.
while lTkt
cFileName := ( cPath + LTrim( Str( GetTickCount(),8 ) ) + cExtension)
if .not. File( cFileName )
lTkt := .f.
endif
end
asito
 
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México

Postby Antonio Linares » Wed Jul 18, 2007 4:35 pm

Yes, you are right, because if a not valid filename is used then File() will not properly work
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby asito » Thu Jul 19, 2007 11:01 pm

Hi again,

I finally got it working. The problem was that 2 old Pentium II pcs running NT had problems with the GetTickCount function. I replaced it with nRandom and now is working fine.
The XP's pcs had no problems.

Thanks a lot
asito
 
Posts: 10
Joined: Fri Nov 25, 2005 9:08 pm
Location: México


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 11 guests