ms access database on a web host ?

 I am following along with the examples in a book where the authors use a Microsoft Access database.

in such a manner <asp:AccessDataSource Id="AccessDataSource1" DataFile="~/App_Data/Datafile.mdb ...  />

 

I copied the Access file to my Virtual Directory on my web host, but I am getting an error which basically says

that there is an error with my web.config file. 

 

But what? There is tons of information about what to do about Sql Server but I am not finding much about Ms Access.
 

0
ieee488
2/11/2008 12:51:10 AM
asp.net.config-deploy 12495 articles. 0 followers. Follow

8 Replies
716 Views

Similar Articles

[PageSpeed] 13

 You can get information about connecting to various databases from http://www.connectionstrings.com/


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
TATWORTH
2/11/2008 1:25:05 AM

I am aware of connection strings.

With SQL Server, the connection strings are different, but they are there depending on if the website is on my PC using SQL Express 2005 or on a webhost using their full blown SQL Server 2005. 

However, there is thus far in the book no mention of a connection string for the Access file when the it is on my local PC IIS. Is there a default connection string in a file somewhere? If so, where? Or is there no need for a connection string when the Access file is local?

0
ieee488
2/11/2008 2:33:10 PM

Again, use www.connectionstrings.com.  You'll find that the MS-Access strings depend on a location of the MDB file, whioch you upload.  MS-Access has some specific requirements for folder security since it has to create temporary files, but it is not dependent on a server installation of anything.  MSSQL has an engine on the server, MS-Access does not.

Jeff


Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
0
jeff
2/11/2008 4:08:03 PM

I understand that I am suppose to use a Connection String.

I want to know why there isn't one when I use a MS Access file that is on my local computer? Is there some assumed default. If so, what is that assumed default? Where is it located?

Right now there is NO connection string in web.config, and the website works on IIS that is running on my PC. I am looking to understand why that is.

0
ieee488
2/11/2008 4:55:35 PM

The connection string doesn't need to be in web.config.  It can be in the code itself.

Jeff


Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
0
jeff
2/11/2008 7:49:33 PM

No, I don't see a Connection String anywhere.

There are 4 files and I typed the files myself.

 The only code I see is

	<asp:DropDownList ID="ddlProducts" runat="server" Width="150px" AutoPostBack="True" DataSourceID="AccessDataSource1" DataTextField="Name" DataValueField="ProductID"></asp:DropDownList><br />
	<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="../App_Data/Halloween.mdb" SelectCommand="SELECT [ProductID], [Name], [ShortDescription], [LongDescription], [ImageFile], [UnitPrice] FROM [Products] ORDER BY [Name]"></asp:AccessDataSource>
 
The only thing I did was to use the Data Source Configuration Wizard for the dropdownlist.
 
Where is the Connection String hiding itself? 
 
 
0
ieee488
2/12/2008 2:28:03 AM

ieee488:
I don't see a Connection String anywhere.
<asp:DropDownList ID="ddlProducts" runat="server" Width="150px" AutoPostBack="True" DataSourceID="AccessDataSource1" DataTextField="Name" DataValueField="ProductID"></asp:DropDownList><br />
	<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="../App_Data/Halloween.mdb" SelectCommand="SELECT [ProductID], [Name], [ShortDescription], [LongDescription], [ImageFile], [UnitPrice] FROM [Products] ORDER BY [Name]"></asp:AccessDataSource>
 
 

Hi ieee488,

You cannot find a static connection string in your project because “AccessDataSource” generates it dynamically based on the “DataFile” property. “AccessDataSource” contains a private method named “CreateConnectionString”. This method takes responsibility to generate the actual connection string.

    return ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + this.PhysicalDataFile);

By the way, to ensure the access db works on the server side, please make sure the “App_Data” folder exist on the server and “ASPNET” (for IIS 5.x) or “Network Service” (for IIS 6.0) accounts have read/write permission of the .mdb file in that folder.

 


Sincerely,
Benson Yu
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
0
Benson
2/14/2008 7:15:27 AM

Ah, that's exactly what I wanted to know.

 I'm not sure how to give Network Service read/write permission to the .mdb file in App_Data foler. How do I go about that as the server is on a paid webhost; it's not a server that I control. I currently have App_Data chmod'd to 666 which probably is insecure but did do the trick.

0
ieee488
2/14/2008 2:06:15 PM
Reply:

Similar Artilces:

Accessing the PC database using a web-page and PowerBuilder 5.0 front-end and MS Access Database
I am trying to connect my web page, which is the standard HTML Explorier applet to my MS Access Database by way of PowerBuilder 5.0. I would like the steps and PowerBuilder Script to make this work. I was told that this is possible, but I don't know where to start, where to place the needed Script, and how to get the link on the web page to call up Powerbuilder to access the MS Access database. Help! You create a PB user object that has methods that do the access. You deploy that as a distributed PB component and then access it using Web.PB. Read more on distributed PB and...

deploy a .net 2.0 web project with ms access provider
Hi, My host company supports asp.net 2.0 and ms access (integrated http://msdn.microsoft.com/asp.net/downloads/providers/). When I deployed the above built in VWD 2005, the web complains: Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: Could not load type 'AccessProvider.AccessMembershipProvider'.Source Error: Line 36: <clear/>...

Connection string with web.config file (MS Access database file)
Hi,I have a ms access file int he App_Data ditrectory of my solution explorer the file is of course in the inetpub/wwwroot/form directory (a solution i created to test this...Anyways I need help creating an access connection string.  I have one currently working for sqlserver 2005 in that file...So I want to add a new one and have lots of strings in one file to chose from...I can't find any good examples online and need a little help constructing the connection string.Thanks,Frank  Seek no more.  Bookmark this page: www.connectionstrings.com Regards Mike [MVP - ASP/ASP....

setup AP.NET membership database & web.config in .NET 3.5?
 A long time ago I setup an ASP.NET security database using aspnet_regsql.exe. I noticed this utility doesn't ship with .NET 3.5. Can anyone direct me to a writeup of how to create the security database and modify the web.config for membership? Thanks! Michael  Hello Michael, You still use the .net framework version 2 version of aspnet_regsql.exe in something like C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727As I understand it ver 3.5 is just adding new features onto the version 2 framework but mostly asp.net is just the same. Hope it helps JeremyRegardsJeremyIf ...

Access database and web host
I am wondering if I upload an Access database and place it in the App_Data folder will it work even though in the base plan of the hoster states that Access databases are not included in their base plan? Hi, It should work as access doesn't use any windows services, it just reads from the file. Why they have said it isn't included, i'm not sure. But, as always, the best thing to do is try it and see with your particular hosting company. I have done this before without any issues though. JC  Please mark the post(s) that helped you as the answer. You get points,...

Access to database from web.config
 Hi everyone !i'm really a poor beginner in ASP.net so i need your help. I made some search before posting my probleme here but i couldn't find the answer :(actually i want to access to my database (Microsoft Access databese) from the web.config file but i think that i missed something in the ConnectionString.i found that the connectionstring for accessing to a Microsoft Access databse is :connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mydatabase.mdb;User Id=admin;Password=;i've put my database in th "App_Data" folder so i wrote as a connec...

Access to database from web.config
Hi everyone !i'm really a poor beginner in ASP.net so i need your help. I made some search before posting my probleme here but i couldn't find the answer :(actually i want to access to my database (Microsoft Access databese) from the web.config file but i think that i missed something in the ConnectionString.i found that the connectionstring for accessing to a Microsoft Access databse is :connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mydatabase.mdb;User Id=admin;Password=;i've put my database in th "App_Data" folder so i wrote as a connectionstring...

Develop in .NET 3.5...Deploy on .NET 3.0...Assembly strong name issue in web.config
Hi. I develop locally using web developer express 2008. I have .NET 3.5 installed on the development machine.I am trying to deploy to a Windows Server 2003 machine running.NET 3.0.Not surprisingly, I get an error about the strong assembly names referenced all over my web.config when I try to access the site on the production server.I don't think any of my code truly relies on .NET 3.5--it should all be compatible with the 3.0 framework.Here's my error message:Parser Error Message: Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77...

Accessing my database on my web host server
I have whole program working at local host level but unable to get to my database at my web server host. Please help Using asp.net language=VB Any help would be extremely appreciated Do I need DSN web host and local host using microsoft access.Jet.4.0 Hi, Sounds like you are using a MS Access DB as a datasource for your ASP.NET application. Also, it sounds like the solution works on your computer, but fails when you try to move it to a server. It's not clear if you have the web server, or you are using a hosting service. If you are using a hosting service, make s...

MS Access Database in web matrix.
Hi, I am not a professional web developer but my Hobby is developing website / Application. I am yet to develop any dynamic website. I am in the process of doing so.I Learnt how to develop asp.net files using web matrix and MSDN database. It was perfectly fine in this environment.Now I am shifting towards, Web Matrix and MS ACCESS (.mdb) database. (In Web matrix web server). No error is reported, But the database is not updated.Any Suggestions?Can any body help.Thanks in AdvanceThiru Thiru--Regarding this... Thiru wrote:...I Learnt how to develop asp.net files using web matrix an...

Usage of MS access database in web
Hi everybody,              Iam using Access database in my web application. I faced a problem that access database is only allow some specific number of users .Iam using that database as read-only, no updates to data .After reading so many articles in web i come to know SQL server is best database for web applications which having high stress and concurrency.This SQL server requires licensing but iam not able to spend that much amount.Is there any solution, that access database will work in this kind of situation? If yo...

access database connection in web config
Hi, i try to connect access database through web config it throws error   "KEYWORD PROVIDER NOT SUPPORT PLEASE GUIDE ME VERY URGENT. <appSettings>  <add key = "accessstring" value= "Data Source=D:\Tirupathi\thirupathi.mdb;Provider=Microsoft.Jet.OLEDB.4.0"/>   </appSettings>Regards,Kannandesikan  Remove the Provider from connection string and try<appSettings>  <add key = "accessstring" value= "Data Source=D:\Tirupathi\thirupathi.mdb;"/>   </appSettings> If this...

Accessing SQL database through web.config
I currently have a connection string coded in my code as follows: DataConnection.ConnectionString = _ "workstation id=HM288303078631;packet size=4096;integrated security="SSPI; data source=hm288303078631;persist security info=False;initial catalog=HMDevelopment"  I also have a connection string in the web.config file.  Is there a way that I can use the connectionstring from the web.config instead of coding it in my code so when I move the code to my hosted server I don't have to change the connection string in every program. Sure you can.  If you create...

Web Deployment Project - Config Properties
I'm using a Web Deployment Project to compile my web site. In the Property Pages - Configuration Properties - Deployment section, there is an option to 'Enable Web.config file section replacement'. I have this working to replace certain sections of my web.config for each build config (release/staging/dev). I think this makes sense so other developers do not have to remember to change the web.config file. HOWEVER, this only seems to work when replacing parts of web.config; such as appSettings, connectionString, etc. This would require me to have separate config files for each section and bui...

Web resources about - ms access database on a web host ? - asp.net.config-deploy

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Five million customers affected by Vtech database hack
Toy and educational material seller Vtech has revealed five million customers were affected by a hack of its app database and has also suspended ...

Ben Carson calls for database of all foreigners in US
Boston Herald Ben Carson calls for database of all foreigners in US Boston Herald Republican presidential candidate, Dr, Ben Carson, center, ...

GOP rivals condemn Donald Trump for backing Muslim database
COLUMBIA, S.C. (AP) — Retired neurosurgeon Ben Carson said Saturday that he wants to expand the government's surveillance operations aimed at ...

Donald Trump wants "surveillance of certain mosques," database of refugees - Videos - CBS News
... rally in Birmingham, Alabama, Republican presidential candidate Donald Trump called for increased scrutiny over mosques, along with a database ...

Trump Wants A Database For All Syrian Refugees Who Enter America
Trump Wants A Database For All Syrian Refugees Who Enter America

US Republican rivals blast Donald Trump for Muslim database comments
US Republican rivals blast Donald Trump for Muslim database comments - Donald Trump said he would implement a database to keep track of Muslims ...

VTech Admits Lack of Database Security Opened Door to Hack
A SQL injection, a common software flaw, was found to be the root cause in the VTech breach.

Animal Venom Database Could Be Boon To Drug Development
A new public database that catalogs animal toxins could spur the development of new drugs made with compounds found in animal venom.

Resources last updated: 12/5/2015 10:38:52 PM