Where are the files created?

Post Reply
User avatar
Ross_ValuSoft
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

Where are the files created?

Post by Ross_ValuSoft »

Hi all,

I have just returned to using FWPPC after a looong absence.

By way of refreshing my old brain, I have built a few samples including one called "pawel.prg" which creates a dbf file named test with 30000 records. The application was run under the emulator and produced the file shown in the image below. I would like to examine it outside of the emulator's "world", but I cannot find it anywhere on the PC.

Where does the emulator write such files. I have a directory called "C:\pocketpc" which is shared with the emulator and where the newly created .exe applications are stored for use ... but no files.

Thanks,

Ross



Image
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Where are the files created?

Post by Antonio Linares »

Ross,

The files are created in the root folder (there is no drive "C:") of the Windows Mobile unless CurDir() is used.

You have to modify these lines in FWPPC\samples\pawel.prg to get the files in the shared folder:

Code: Select all

   FErase ( CurDir() + "\Test" + IndexExt() )
   ...
   DbCreate( CurDir() + "\Test", aStr ) 
   USE ( CurDir() + "\Test" ) NEW 
   ...
   INDEX ON F1 + F2 Tag T1 TO ( CurDir() + "\Test" )
   INDEX ON Field->F5 + Field->F1 + Field->F2 Tag T2 TO ( CurDir() + "\Test" ) 
   INDEX ON Field->F4 + Field->F1 + Field->F2 Tag T3 TO ( CurDir() + "\Test" )
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Ross_ValuSoft
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

Re: Where are the files created?

Post by Ross_ValuSoft »

Thanks for your reply Antonio.

Yes, I had tried that earlier without any success.

Then I added a simple MsgInfo( CurDir() ) and it shows a blank. This is using the Pocket PC 2003 Second Edition emulator. Could that be the cause?

I think that I will have to continue using the emulator just for on-screen positioning verifications and the real Dell Axim for performance work. Disappointing.

Cheers,

Ross
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Where are the files created?

Post by Antonio Linares »

Ross,

I have just tested this test.prg example and worked fine as you can see in the screenshot :-)

Code: Select all

#include "fwce.ch"

function Main()

   MsgInfo( CurDir() )

return nil
 
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Ross_ValuSoft
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

Re: Where are the files created?

Post by Ross_ValuSoft »

Good morning Antonio ...

Here is mine ...

Image
User avatar
Ross_ValuSoft
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

Re: Where are the files created?

Post by Ross_ValuSoft »

I just used your code Antonio and got your result. Something strange at this end of the world. I will dig deeper.

Thanks for your help. Enjoy your Thursday.

Cheers,

Ross
User avatar
Ross_ValuSoft
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

Re: Where are the files created?

Post by Ross_ValuSoft »

Solved!

The first of the "pawel" series of programs that I tried, pawel2.prg, had used #include "fwce.ch". Pawel.prg did not!

There is always an explanation ... just have to look very carefully.

Thanks.

Ross ( :oops: )
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Where are the files created?

Post by Antonio Linares »

Ross,

good to know that you found the reason :-)

Yes, FWPPC CurDir() is a different code from Harbour's one as there are no drives "names" (C:, ...) in Windows Mobile and fwce.ch replaces it, so it is needed.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply