Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access database error "Could not find file"?

Tags:

asp.net

vb.net

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.

like image 790
Chidi Okeh Avatar asked Dec 15 '22 14:12

Chidi Okeh


1 Answers

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

INSERT INTO dbo.someTable ...

Remove the namespace and it should correct the issue.

like image 62
John Koerner Avatar answered Jan 05 '23 14:01

John Koerner