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

Invalid File Name

Status
Not open for further replies.

Triedit

Technical User
Mar 9, 2001
28
GB
I have just loaded Paradox 7 onto a system with Win98, I have transferred all my old files over from another system and althought they all worked fine on the old system I keep getting an 'invalid file name' error. Can anyone please help! It's driving me to distraction. I've even tried creating a new table and when I use it as part of a query I get the same problem.
 
You're going to have to provide a little more detail. Does the error occur when you load a form, script or report? Does it happen in multiple situations?

It's probably an issue with an alias, but we need more info.

Mac
Mac
:)
 
Triedit,

Typically, I've seen this caused by stylesheet issues. (See the related articles at for full details.)

(And, just in case, Paradox always saves stylesheet information with all forms and reports, so you are actually using them. Even if you're not directly using custom stylesheets, they're still an issue.)

When you change your development environment, it's always a good idea to resave all Paradox documents (forms, reports, libraries, and so on) in your new environment, especially when you change the drive where Paradox was located. You can do this using ObjectPAL; there's some useful code in and the sample download script can be used as a starting point.

Langley's point about aliases is a good one. You should also check any table lookups that were defined to tables located in different directories. For historical reasons, Borland chose to hardcode the full path of table lookups located in directories other than the one containing the table itself.

For example, if I define a lookup from c:\path1\TableA to c:\path2\TableB, BDE stores the full path of TableB as part of the lookup definition.

This does not occur when all tables are stored in the same directory and is part of the reason why the conventional wisdom is to store all Paradox tables for a project in a single directory.

Langley's point about more details is also well taken. Have you tried simply opening and editing the table itself? Where, specifically, does the error surface? What is the full error? Is the >> button enabled when the error appears? If so, what is displayed when you click it? And so on...

Hope this helps...

-- Lance
 
Triedit,

Oh, one final thought occured to me. How did you transfer the Paradox files over? Did you burn a CD and then copy them using Explorer?

If so, then it's possible that your files still have the read-only flag enabled. (This happens when you copy files from a CD. The file is read-only on the CD and Windows applies the same attributes on the copy.)

To check this:

1. Start Windows Explorer and then navigate to the directory containing your table.

2. Locate the .DB file and then right-click it.

3. Choose Properties from the shortcut menu.

4. Locate the section of the property sheet called Attributes and then see if there's a checkmark in the Read-only attribute.

If so, then that's your problem. You need to clear the read-only attribute of all your files.

You can do this quickly by:

1. Using Explorer to locate the parent directory of the one containing your files. For example, if your tables are located in C:\DATA\MYTABLES, then you'd navigate Explorer to C:\DATA.

2. Right-click your directory's folder (MYTABLES in the above example) and then choose Find.

3. When the Find Files applet appears, simply press the Enter key. You'll see a list of all files in your data folder and any additional child folders.

4. Press Ctrl+A to select all files.

5. Right-click one of the selected files and then choose Properties from the shortcut menu.

6. The Read Only checkbox will likely be grayed. Click it until you clear the checkmark.

7. Choose OK.

At this point, you should be able to work with your tables.

Hope this helps...

-- Lance
 
Hi Guys, thanks for your help, I have sorted it. Yes I did burn the files to CD and yes that caused me a problem with read only tables but I sorted that! The problem was caused by too long a path name....so I shortened it and it works fine now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top