a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Connecting to Access database via webpage

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Connecting to Access database via webpage
Page: [1]
 
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.
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Connecting to Access database via webpage - 4/2/2007 16:06:15   
Basically the company have fobbed you off. Thats an asp connectione string, not aspx
Did you send them the same error as above and mention the .net version?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to Rwheldon)
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.

(in reply to Spooky)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> Connecting to Access database via webpage
Page: [1]
Jump to: 1





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