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

clipper exe and the loaction of the DBF's 4

Status
Not open for further replies.

bobmie

Programmer
Oct 22, 2005
16
0
0
BE
Hallo
I subscribed today.
My problem
Can a Clipper exe(version 5.2d) ( for example CHOQO.EXE ) be stored in an other folder than the folder where my CHOQO.DBF s are stored.
Thanks in advance for your response
 
Bobmie,

It will all depend on the code in CHOQO.EXE - Clipper programs can be written to read data from any available folder (watching out for long file names of course).

To access data somewhere other than the default folder, the programmer typically uses code like this:

Code:
select 0
use ("c:\myfolder\CHOQO")

Or using a memory variable to make it more flexible:
Code:
MyFolder = "c:\myfolder\"
select 0
use (MyFolder+"CHOQO")

Hope that helps

PS Remember to use a similar statement to access the index files


Regards

Griff
Keep [Smile]ing
 
Hello Bobmie,

you can put in your program something like this:

SET DEFAULT TO MYDIRECTORY
SET PATH TO C:\MYDIRECTORY

and your program use your .dbf's of C:\MYDIRECTORY

I hope this help you.

Lzulli
 
Hey GriffMG and Lzulli
First ... thanks for your fast response and help
But : I wrote in my CHOQO prg
SET DEFAULT TO f:\beheer\datastore\cho_db //MYDIRECTORY
SET PATH TO f:\beheer\datastore\cho_db
use rol
wait
and I get a dos open error 3 for rol dbf on execution
and rol.dbf resides in folder cho_db

My general interest: I am now trying to upgrade the clipper choqosoftware for A.I. in Belgium working as a volunteer
bye


 
The value 'datastore' is 9 characters long, and so is a long filename, that aren't supported by Clipper.
Either rename the directory to 'datastor' or use the short name like 'datas~01' or whatever it is on your system.

HTH
TonHu
 
Tip for you, if you want to know the 'short file name':

Code:
1) open a DOS or Command window.
2) Navigate to your folder
3) use Edit to open ANY file e.g. edit c:\autoexec.bat
4) leave Edit without saving any changes

Your DOS/Command window will probably have switched to short filename format and your current prompt will tell you the short name





Regards

Griff
Keep [Smile]ing
 
Hey GriffMG

Also DIR with /X option gives you the short form as well as the long form (assuming you are using cmd as your command interpreter).

Jock
 
OK.. Thanks all of you. The path problem is solved
But : I want to know in which drive or folder my CHOQO exe ( running clipper 5.2d) is running. I put the function diskname() in.
Compiling and linking is OK ( I got the extend lib )
But : execution gives a memory problem and the program abort
is there a easy solution ???
My Blinker script file
Blinker incremental off
Blinker executable extended
output choqo_n
file ac0, ac0,ac1,ac2,ac3,ac4
search f:\beheer\dosstore\my_lib\blxclp52
lib f:\beheer\dosstore\my_lib\CLIPPER
lib f:\beheer\dosstore\my_lib\EXTEND.LIB
lib f:\beheer\dosstore\my_lib\TERMINAL.LIB
lib f:\beheer\dosstore\my_lib\DBFNTX.LIB
lib f:\beheer\dosstore\my_lib\CT.LIB
lib f:\beheer\dosstore\my_lib\DBFCDX.LIB
lib f:\beheer\dosstore\my_lib\OVERCL
 
Try burning your memory settings into your exe, put this line at the beginning of your Blinker Script:

Code:
BLINKER EXECUTABLE CLIPPER F225;E0;
(that's E ZERO btw)

The F225 is probably not required, but the E0 will stop your program from using extra memory - which Clipper makes a mess of!



Regards

Griff
Keep [Smile]ing
 
Hey Griff
I followed your suggestion
But still the same problem

BLINKER EXECUTABLE CLIPPER F225;E0;
Blinker incremental off
Blinker executable extended
output choqo_n
file ac0,ac1,ac2,ac3,ac4
search f:\beheer\dosstore\my_lib\blxclp52
lib f:\beheer\dosstore\my_lib\CLIPPER
lib f:\beheer\dosstore\my_lib\EXTEND.LIB
lib f:\beheer\dosstore\my_lib\TERMINAL.LIB
lib f:\beheer\dosstore\my_lib\DBFNTX.LIB
lib f:\beheer\dosstore\my_lib\CT.LIB
lib f:\beheer\dosstore\my_lib\DBFCDX.LIB
lib f:\beheer\dosstore\my_lib\OVERCL
 
I'm not sure how else to help on this one, what's the OS?



Regards

Griff
Keep [Smile]ing
 
Hey Griif
Thanks for your attention. I solved the problem searching again this forum.
I found a msg : If all else fails run a DIR *.XXX > TextFile.TXT and look in the resultant file for the drive letter.Ian Boys DTE Systems Ltd
So I coded this solution in my CHOQO exe and also read in CHOQO exe the produced TXT file and then searched for the drive letter !!
It is very tedious but it works.. THANKS !
 
Good luck to you, well done.

Martin
B-)

Regards

Griff
Keep [Smile]ing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top