4

I have been using Access database as db of choice for a long time now and this is the first time I have run into the following error message:

Could not find file 'C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\dbo.mdb'

First, I don't have a db called dbo.mdb.

Second, the path to the db is defined in my web.config file thus:

<connectionStrings>
<add name="cingconstrng" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\Roster\App_Data\AllStars.mdb" providerName="System.Data.OleDb" />
</connectionStrings>

Funniest part is that I am passing the connection string to some files without problem.

So, why is it different with this file?

Is it because I am inserting records into the db with with this file?

Any ideas is greatly appreciated. I have been working on this issue since last night and googling hasn't provided any solutions.

4
  • Check your code with a debugger. Stop where you open the connection and verify the connection string used. Commented Jan 25, 2013 at 16:05
  • 1
    Are you using any table prefixes in your insert statements? Insert into dbo.someTable ... Commented Jan 25, 2013 at 16:12
  • No, @John. that's one of the weirdest things. Commented Jan 25, 2013 at 16:28
  • 1
    @John, God BLESS you. I was! Sorry didn't mean to lie. I removed them but apparently in midst of frustration, I snuck it back in there without knowing it because I was trying everything. Thank you very much sir. Very nice catch. I don't know how you give credit here. Commented Jan 25, 2013 at 16:31

1 Answer 1

12

You can see this behavior if your SQL statements use namespaces:

INSERT INTO dbo.someTable ...

Remove the namespace and it should correct the issue.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks again. I was going to demo this app by 1pm. Now, it is possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.