Solved

Strange connection problem

Posted on 2008-10-13
2
240 Views
Last Modified: 2013-12-17
There are 2 Access databases, and user chooses to which database to connect to. Now, When connected to database1, everyting works well. When connected to database2, I get following exception:

c:\SomePreviousDatabasePath\database2.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.

Now, the message is very precise, but the problem is I dont use this path anywhere in connection string. What is even more strange, the connection opens without any errors.

myCommand.Connection.Open(); // no exception raised here
OleDbDataReader dr = myCommand.ExecuteReader(); // this line throws exception

MyCommand.CommandText doesnt have any database pats in it, just a reguler SELECT somefields FROM tableName WHERE some condition

Has anyone had this problem before?

Thanks,
Goran
0
Comment
Question by:Priest04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
mkosbie earned 500 total points
ID: 22707408
Is the mdb file setup with linked tables maybe?  Are the tables linked from a datasource that no longer exists?
0
 
LVL 18

Author Comment

by:Priest04
ID: 22707753
:) ccccc....... Yes, there were some linked tables, although I don't use them, I have added them few days ago just for some testing purpose, and forgot to remove them. I am so filled with work, that I feel all lost. :)

Thanks mkosbie, much appreciated.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question