Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2004, 12:04 PM
Authorized User
 
Join Date: Jul 2003
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default UDL Connection Problem

I get the following error when I try to access my UDL. I included the code I'm using two versions. Any one know what the problem is?

Provider error '80030005'

Access Denied.

/testconnection.asp, line 6


<%
option explicit
Dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "File Name=\\FLDOIREMRHBFP4\INTRANET\TEST\TESTSQLCONNECT ION.UDL"
%>

<%
    dim dcndb

    set dcndb = server.createobject("adodb.connection")
    dcndb.connectionstring = "file name=\\FLDOIREMRHBFP4\INTRANET\TEST\TESTSQLCONNECT ION.UDL"
    dcndb.open

%>



 
Old July 8th, 2004, 12:23 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

It seems you are trying to access the UDL file from remote system. It is due to privilege problem between the remote system and your WEB server. Why don't you have that within your webserver that hosts the asp page. why do you want it to be on remote system on your network? Where is the DB running?

_________________________
- Vijay G
Strive for Perfection
 
Old July 8th, 2004, 12:41 PM
Authorized User
 
Join Date: Jul 2003
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

UDL is sitting on IIS. The database the UDL connects to is sitting on a SQL Server. Would it appear my problem is between my IIS/Webserver and SQLServer? If I go to the UDL and test the connection it say the test is a succes. So does that mean the problem is between the browser and IIS?

Thanks!
Rich

 
Old July 8th, 2004, 01:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

So where is your testconnection.asp, UDL, SQL server all lying?

I assume testconnection.asp is sitting on IIS server somewhere under wwwroot. So UDL should also be somewhere within that box. Though it doesnt matter your SQL server runs on the same box or different.

Is my guess right?

_________________________
- Vijay G
Strive for Perfection
 
Old July 8th, 2004, 01:22 PM
Authorized User
 
Join Date: Jul 2003
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In the same folder.

 
Old July 8th, 2004, 01:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Then why do you have to use it this way?
\\FLDOIREMRHBFP4\INTRANET\TEST\TESTSQLCONNECTION.U DL

replace that with

Server.MapPath("./TESTSQLCONNECTION.UDL")

Code:
oConn.Open "File Name=" & Server.MapPath("./TESTSQLCONNECTION.UDL")
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 8th, 2004, 03:15 PM
Authorized User
 
Join Date: Jul 2003
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a million brother!

Peace Out!
Rich






Similar Threads
Thread Thread Starter Forum Replies Last Post
connection to sqlserver through udl file qiux ADO.NET 1 May 21st, 2008 11:12 AM
vb.net & .udl file sachinbashetti Crystal Reports 0 May 23rd, 2005 02:00 AM
Wondering why .UDL for connecting string shailu BOOK: Beginning ASP 3.0 3 May 17th, 2005 07:39 AM
Problem with the connection! Berni016x SQL Server 2000 2 November 9th, 2004 08:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.