Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.net 1.1 and Access database connection

Status
Not open for further replies.

hockeylvr

Technical User
Nov 26, 2002
140
0
0
Would someone mind looking at my .aspx page and pointing out anything in it that could be keeping my page from being viewed on our intranet web server?

web.config

<configuration>
<system.web>

<appSettings>
<add key="connectionstring" value="Data Source=Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Usawvxx01\materials.com\ToniTest\CostSavings\data\CostSavingsProjects.mdb; User Id=admin; Password="
</appSettings>

<customErrors mode="Off">
</customErrors>

<authentication mode="Windows">
</authentication>

<authorization>
<deny users="?" />
</authorization>

</system.web>
</configuration>

.aspx db connection

<%@ Page Language="VB" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDB" %>
<%@ import Namespace="System.Web.UI" %>
<%@ import Namespace="System.Configuration" %>

<script runat="server">

Sub Page_Load()

Dim connString As String=ConfigurationSettings.AppSettings("connectionstring")

Dim objConn as OleDbConnection
objConn = New OleDbConnection(connString)
Dim objCmd As Data.OleDb.OleDbCommand
Dim objRdr As Data.OleDb.OleDbDataReader

I've placed the web.config in "materials.com", did have it in "ToniTest", still not working.

Still getting a can't make connection error.

I have had no luck connecting to sql db either.

Thanks,

Toni

 
That's kind of what I'm looking for. I think it looks correct but can't see what could be wrong with it.

 
I posted the web.config info prior to removing the 2nd "Data Source" line. I am getting a cannot connect error.

<appSettings>
<add key="connectionstring" value="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Usawvxx01\materials.com\ToniTest\CostSavings\data\CostSavingsProjects.mdb; User Id=admin; Password="
</appSettings>

 
There is one FAQ regarding connection strings and it points to a website that happens to be where I did get my connection string from. I guess I will just assume that it's correct and that I have a different issue. Also, since there was no comment on my web.config, I'll assume that was correct as well.

Thanks,

Toni
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top