|
| |
|
|
Rwheldon
Posts: 2 Joined: 4/2/2007 Status: offline
|
Connecting to Access database via webpage - 4/2/2007 7:35:34
Firstly, please excuse my ignorance. I have created a site in Expression Web using an access database in a sub folder. I have used access datasource and grid view. Everything works fine on my local server. When I publish the site to an online server I get the follwing error: *********************************************************************** Server Error in '/' Application. -------------------------------------------------------------------------------- Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type System.Web.UI.WebControls.AccessDataSource from assembly System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Source Error: Line 11: Line 12: <form id="form1" runat="server"> Line 13: <asp:AccessDataSource runat="server" id="AccessDataSource1" DataFile="dBase/WCSstocklist.mdb" SelectCommand="SELECT [WCS Ref] AS WCS_Ref, [Name], [Year], [No], [Size], [Beds], [Price], [Image1] FROM [WCSStocklist]"> Line 14: </asp:AccessDataSource> Line 15: <asp:GridView runat="server" id="GridView1" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" AllowPaging="True"> Source File: e:\USERS\Richard\www\Stocklist.aspx Line: 13 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300 *********************************************************************** I have contacted my hosting company and they have told me use the following to connect to my database: Dim objDbConn Set objDbConn = Server.CreateObject("ADODB.Connection") objDbConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\db\MyDbName.mdb") Where would I put this script? I personally think that the server ASP and NetFramework versions are incorrect as the bottom of the error report shows the ASP and Net Framework versions 1.1 I have been told that my original page should work if the server has got ASP version 2.0 and Net Framework 2.0? Any help would be greatly appreciated.
|
|
|
|
Rwheldon
Posts: 2 Joined: 4/2/2007 Status: offline
|
RE: Connecting to Access database via webpage - 4/2/2007 18:04:15
Thanks for the reply. I had already submitted two support 'tickets', one asking about the server .net versions and one about the connection string. As of yet no response I'm afraid. I usually use another hosting Company which have been brilliant, however they don't support ASP.NET at all. As I said, I am a bit ignorant when it comes to databases. I have spent hours trawling the net figuring how to create them and filter data for datatable etc.. I am quite happy that I have got it all to work on my local server exactly as I wanted it to. My confusion is, if I use an access datasource in Expression web, should it work when published (assuming the folder structure is intact and the database folder is set up correctly (read and write access). Or do I need other connectionstrings because it is on the www? I publish the database with the website, as it is structured on my local machine. Are access data sources only supported with ASP.NET 2.0 and NET Framework 2? Again, any advice is appreciated. Many thanks.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|