Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
08-07-2005, 05:06 PM #1
- Join Date
- Aug 2005
- Thanked 0 Times in 0 Posts
Custom Classes and Ole DB connections
Good Morning Everyone,
I developed a web application on my home computer and it runs fine on the virtual directory. It consists of .aspx web pages that use a custom class called clsDataAccess to interact with an Access database. I uploaded the entire contents of the folder on my home computer to a web server. When I input the url for the website into my browser the index page loads just fine. But when I click a link to go to another page that uses a custom class to access an Access database to fill drop down menus I get an error. On the surface it looks like an Ole DB error. This is the connection string I am using. Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
HttpContext.Current.Server.MapPath("Database/PatternNumbers.mdb"). Everything I have read says this should work, but I am getting this error.
Server Error in '/' Application.
An OLE DB Provider was not specified in the ConnectionString. An example would be,
'Provider=SQLOLEDB;'. Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[ArgumentException: An OLE DB Provider was not
specified in the ConnectionString. An example would
connectionString, UdlSupport checkForUdl) +144
sender, EventArgs e) in
System.Web.UI.Control.OnLoad(EventArgs e) +67
It almost seams like it is not even getting to the connection string because it is looking for
clsDataAccess on C:\ drive. Do I need to use the web.config file to map the location of custom classes before using them? They are currently in the same folder as the home page named index.aspx.
08-08-2005, 11:00 AM #2
- Join Date
- Apr 2003
- Thanked 13 Times in 13 Posts
hmm i was wondering why no1 posted in the asp.net section.. its all still being posted in here
08-08-2005, 04:43 PM #3
- Join Date
- Sep 2004
- Thanked 40 Times in 40 Posts
Can you post your entire connection code for us to take a look at?