How does File() work?

How does File() work?

Postby dutch » Mon Aug 28, 2006 6:29 pm

Dear All,

I try to check database file is exist or not buy use file() but I don't know how to success.

- File( "TEST.DBF" ) is not working
- File( CURDIR()+"\TEST.DBF" ) is not working
- File( "\\"+CURDIR()+"\TEST.DBF" ) is not working

Thank you for any idea.

Best regards,
Dutch
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: How does File() work?

Postby Richard Chidiak » Mon Aug 28, 2006 6:49 pm

dutch wrote:Dear All,

I try to check database file is exist or not buy use file() but I don't know how to success.

- File( "TEST.DBF" ) is not working
- File( CURDIR()+"\TEST.DBF" ) is not working
- File( ""+CURDIR()+"\TEST.DBF" ) is not working

Thank you for any idea.

Best regards,
Dutch


Dutch

FILE(CURDIR() + "\TEST.DBF") IS THE CORRECT SYNTAX.

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby dutch » Mon Aug 28, 2006 6:54 pm

Dear Richard,

I try this FILE(CURDIR()+"\TEST.DBF") on my SD card in PPC but it return .F.

CURDIR()+"\TEST.DBF" = "Storage Card\TEST.DBF"

It doesn't work.

Best regards,
Dutch
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Postby Richard Chidiak » Mon Aug 28, 2006 8:21 pm

dutch wrote:Dear Richard,

I try this FILE(CURDIR()+"\TEST.DBF") on my SD card in PPC but it return .F.

CURDIR()+"\TEST.DBF" = "Storage Card\TEST.DBF"

It doesn't work.

Best regards,
Dutch


It works with my ppc app. i use the file(...) several times.

make sure your test.txt is on the root of the sd card, if not

IF FILE(CURDIR() + "\whatever\test.txt")
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

It works on PPC but not work on Emulator

Postby dutch » Tue Aug 29, 2006 5:11 am

Dear Richard,

Thanks, I try on the Emulator and It doesn't work. But I try again in my PPC, It work ok.

Thanks&Regards,
Dutch
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 52 guests