access 2002 cannot find file when another access instance open

  • Thread starter Stephen J. Levine MD
  • Start date
S

Stephen J. Levine MD

Is there a fix for the following problem that occurs when
Access 2002 runs on top of windows 2000, windows XP Home
and windows XP Professional?:

1. Create a folder called "cant -- find file"
2. In this folder, create two folders called folder 1 and
folder 2.
3. Go into c:\Program files\microsoft office\office10
\samples and copy northwind.mdb
4. Paste copies of northwind.mdb in both folders 1 and
folders 2 created in step 2. Rename the copy of
northwind.mdb in folder 1 to northwind1.mdb and that in
folder 2 to northwind2.mdb.
5. Go into Windows explorer and go to c:\cant -- find
file\folder1 and click on icon for northwind1.mdb. This
should result in Northwind Database opening. Click ok on
Northwind Traders introductory form and then minimize the
database.
6. Repeat step 5 on northwind2.mdb icon in c:\cant --
find file. Northwind database will fail to open with a
message box displaying the error c:\cant - find
path\folder 2\northwind2.mdb is not a valid path. Make
sure that the path name is spelled correctly and that you
are connected to the server on which the file resides.

It appears that, when the Northwind database is opened in
the second instance, the double hyphen is made into either
a single hyphen or a dash. My clicking on the icon in
windows explorer should take care of the spelling, and the
fact that the file is on my C drive should take care of
the network connection issue.

Although I have been using double hyphens in my folder
names for over 5 years (double hyphen is equivalent to a
dash to those of us trained in High School English in the
60's), as a workaround, I will go to single hyphens
although it is a pain in the bottom to have to change what
was, for me, standard practice for naming computer problem
and project folders ({project number} -- {Project Name}).
However, I would prefer a fix to the problem if one is
available.

sjl
 
S

Stephen J. Levine MD

Step 6 was incorrectly typed

It should read:

Repeat step 5 on northwind2.mdb icon in c:\cant --
find file. Northwind database will fail to open with a
message box displaying the error c:\cant - find
file\folder 2\northwind2.mdb is not a valid path. Make
=====
sure that the path name is spelled correctly and that you
are connected to the server on which the file resides.

I also should have typed, in the second line of step 5;
file\folder 1 and click on icon for northwind1.mdb. This
========

I apologize for both typos.

sjl
 
A

Albert D. Kallal

I am not the least surprised that the hyphen in a file can, and does cause
problems.

While it may have worked for you, if you have any understanding of
computers, you would realize that using file names with spaces, and
ESPECIALLY delimiters is a formulas for trouble.

I would suggest that for field names, table names, and in fact all objects
names you DO NOT use spaces.

While ms-access does allow spaces in most object names, you are simply
asking for trouble.

Select * from table test FirstName, LastName

As you can see in the above, is our table name called "test", or table".
There is a zillion places where using spaces, or any delimiter (such as "-")
is going to cause trouble. Of course, ms-access does allow the use of [] to
surround named objects like tables etc, MOST SYSTEMS do NOT allow such
luxury (the industry standard system sql-server for example DOES NOT allow
spaces in table names, nor in field names as this would cause way too much
room for ambiguities.

The same goes for the "-" sign.

select * from tableTest FirstName,One - two

Is that a field called One to be subtracted from two? From a readability
point of view, I would suggest that you avoid delimiters in all access
objects.

While you may not be using spaces, or delimiters in your objects that you
create in ms-access (table names, field names, query names etc), you should
also apply the SAME REASONING to your FILE NAMES!

Likely, you are somewhat new to computers (or simply not have taken time to
realize that spaces and delimiters are a basic staple of how most commands
are interpreted by software).

I just did a search in the Microsoft know Knowledge on:

Hyphen in File

The search engine limits me to viewing 150 bug messages. I am not the least
bit surprised that the search resulted in 150 bug reports. In fact, this
list would be much larger if I could tell the search engine to return more
then 150 entries.

The bottom line here is that using spaces and hyphens in a file name is
asking for trouble.

In fact, from a professional point of view, I would avoid using delimiters
in any kind of object, filename or anything.

To copy a file name, we type:

copy c:\dataFiles\mytest -y c:\olddata\

In the above, the "-y" is a flag to tell the operating system to overwrite
without asking for confirmation. (or, perhaps, I have a file named
"mytest -y"). There is many commands and libraries that you can use that use
the "-" as a flag setting. This is certainly more common in Unix, but even
in windows, a lot of systems actually send text commands to a shell program.
Throwing in a "-" (or any delimiter for that matter) is going to cause the
system to hiccup.

So, I would as a policy, consider not using spaces. You *might* get away
using the hyphen in the file name if you drop the spaces. In fact, to be
fair, the "-" has been a legal character since the dos days (that is
pre-windows). However, the "-" has also been a command line switch for as
long as dos computers have existed (that is 20 years now). So, mixing spaces
*and* hyphens is something I certainly would avoid.

The whole concept of computers and interpreting commands and file names is
based on using delimiters such as spaces, and things like hyphens to figure
out what the heck was just typed!

I am very surprised that you been able to go this long without encountering
more problems.

I could list 100's and 100's of weird errors from the use of hyphens in
software.

A quick look at the Microsoft knowledge base shows that use of hyphens
effects all kinds of products. I have enclosed a few text excerpts from the
knowledge base. However, I pasted them at the end of this email as to not
bore people who don't need to read this, or don't want to!

So, hopefully for things like table names, and field names, you are not
using spaces, and delimiters. And, for file names, they should be avoided
also.

--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.attcanada.net/~kallal.msn


-----
WD97: ODBC Error Opening a DBF File with Hyphen in the File Name

This article was previously published under Q113731
SYMPTOMS

If you try to access a dBASE or FoxPro database file using ODBC as the
conversion method, you may receive the following error message:

Word was unable to open the data source
CAUSE

This error message occurs if the file you are trying to use contains a
hyphen in the file name. (To access a dBASE or FoxPro file, use the Database
command on the Insert menu or the Mail Merge feature.)
---------

Here is another one:

SQL Cluster Install Fails When SVS Name Contains Special Characters
Applies To

This article was previously published under Q220156
BUG #: 54278 (SQLBUG_70)
SYMPTOMS

When installing SQL Server 7.0 clustering on a cluster whose SQL Virtual
Server (SVS) name contains special characters (such as hyphens or dashes),
the Cluster Wizard returns the message "Invalid Name".

-------------
OL2000: Personal Distribution Lists That Contain Hyphens Do Not Resolve
Properly

This article was previously published under Q306630

SYMPTOMS
In Microsoft Outlook, a personal distribution list that contains a hyphen
and begins and ends with the same letter (or number) may not resolve. For
example, if you name a personal distribution list "Office-O," that personal
distribution list may not resolve properly (when you click Check Names), and
you may be prompted to select from a list of the nearest matches.
----------------
 
S

Stephen J. Levine MD

I am actually not new to computers, having done computing
since 1970. And I am aware of the difficulty with
spaces, hyphens, etc.

However, It seemed nice when, in the windows environment,
one could use eyereadable names for files. Given the
amount of documentation that I generate, it just seemed
nice when I could give the folder a normal English label.

But you are indeed right when you say that spaces and
hyphens get you into trouble. I work in both Windows and
Unix and occasionally I will FTP a file (using Windows
FTP, which makes the unix drive kinda seem like a Windows
drive (if you ignore the need to refresh your info) with
a space in it from Windows to Unix and, oh boy, not you
got troubles (although using quotes allows you to
recover).

Anyway, I guess underscores are now safe (unless you are
going in and out of COBOL) so I will use those and just
thank my lucky stars I am no longer limited to 8 + 3 in a
file name (DOS world) or 25 or so characters in other
worlds, and can still have enough latitude that I can
make folder names meaningful by eyeball without having to
look at a table or something to match the project with
its designation.

T'was a nice dream.

sjl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top