DB Connection

cbarthel

New member
Joined
May 13, 2003
Messages
2
I receive this error message while trying to connect to an Access DB:

System.Data.OleDb.OleDbException: Could not find file C:\WINDOWS\system32\CClass.mdb.

Here is some code:

Dim conStudentInfo As OleDbConnection
Dim cmdSelectStudent As OleDbCommand
Dim dtrStudent As OleDbDataReader

conStudentInfo = New OleDbConnection( "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=CClass.mdb" )
conStudentInfo.Open()

I placed the CClass.mdb DB inside my wwwroot folder, along with the page that is trying to view. Originally I had it located somewhere else and I received an error saying that I did not have permission to open it. Any help would be appreciated.
 
HAHAHAHA.....Nevermind, I got it. I placed it directly on my C drive and it found it fine. Is there any particular location scheme that needs to be followed for databases?
 
Just Put the access database file in the slution Folder
and at the datasource just enter "\Database.mdb"
it would work
 
Back
Top