Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Can't find path that's there

Author
Message
Ambitious Guy
16
Years of Service
User Offline
Joined: 1st Aug 2008
Location: Florida, USA
Posted: 18th Dec 2008 16:58
I've done this before and had it worked. But for some reason inside or outside CodeSurge (I.E. the normal editor) It gives me an error saying it can't find the path when it's there in the project folder. I've checked for spelling errors and everything but still can't get DBPro to see it.


The Geek of our time
DsarchyUK
16
Years of Service
User Offline
Joined: 21st Nov 2008
Location: UK
Posted: 18th Dec 2008 19:24
SET DIR has to be set to a directory, not just a name of a folder.

So for example your "Data" could be located in your program files inside on your HDD, so you would have to use something like

Virtual Nomad
Moderator
18
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 18th Dec 2008 20:21 Edited at: 18th Dec 2008 20:35
to help keep things sorted re: multiple directories, define the root directory of the application as a string variable using get dir$ when the app launches (and, if you're using a lot of sub-directories, define those as well). ie:



then later, whenever you want to load stuff:


or, these variances work, too, without set dir:


using this method also helps keep things sorted when you move its location on your computer or share the app with others, keeping it relative to wherever the app happens to reside.

Virtual Nomad @ California, USA
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium
Ambitious Guy
16
Years of Service
User Offline
Joined: 1st Aug 2008
Location: Florida, USA
Posted: 18th Dec 2008 20:43
Ok thanks for the help.

The Geek of our time
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Dec 2008 21:36
The SET DIR command does accept relative directory names. You simply need to have the target directory in the same directory as your executable.

Full pathnames are almost never necessary, and in some cases can cause difficult to find problems - for example, the maximum path size using an ascii string in windows is 260 characters - if you specify a pathname that goes beyond this size, you may have problems.

Login to post a reply

Server time is: 2024-11-24 16:45:49
Your offset time is: 2024-11-24 16:45:49