Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
|
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 August 13th, 2009, 08:38 PM
ldp ldp is offline
Registered User
 
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft OLE DB Provider for SQL Server error '80004005'

I keep getting this error and I dont know why.

This is my connection string:

Provider=SQLOLEDB; Data Source=LDP-PC\SQLEXPRESS; Initial Catalog=DentalConsent; Trusted_Connection=yes; Integrated Security=SSPI

It is using windows authentication so there is no uid or password.

My application is asp classic running on IIS 6 (vista ultimate). this is the dev environment.

I have added iuser permissions and I can't figure out why I am getting this error.

Any help would be appreciated.

Thanks,
ldp
 
Old August 15th, 2009, 11:05 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Pleaes check the following link for setting up connection strings correctly:
http://www.connectionstrings.com/sql-server#6
Also, check the following link for error:
http://tutorials.aspfaq.com/8000xxxx...05-errors.html
__________________
Om Prakash Pant
Click the "Thanks" button if this post helped you.
 
Old August 17th, 2009, 06:05 PM
ldp ldp is offline
Registered User
 
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

om_prakash,

I am pretty sure that my conn string is correct. I even tried using a dsn instead of the dsn-less string and got a similar error.

error '80004005'
/DentalConsent/login.asp, line 12

It must be a permissions issue. I did add the iuser account and gave it access to all actions (write, read etc...).

My error is 'Login failed' but I am using windows authentication (no uid/password).

the closest error in the link provided is as follows:

Microsoft OLE DB Provider for SQL Server (0x80004005)
Cannot open database requested in login 'user_id'. Login fails.

This can occur if you use a valid user name in your connection string, but specify a database that user cannot access. Typically, this is because a user's default database is unavailable for verification (and this is a necessary step in the verification handshake). This can be because the default database is in single user mode, is offline, has been detached, or this user has been explicitly removed from their default database.

I dont understand how to resolve this.





I can't figure this out
 
Old August 17th, 2009, 07:55 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Are you aware that when you use windows authentication with ASP, then the windows USER that connects to the DB is *NOT* you!!! It is IUSR_xxx where "xxx" is the name of your machine.

So if you have NOT authorized IUSR_xxx to use that installation of SQL Server, then of course the windows authentication fails.

In my personal experience, it is far better to *NOT* use windows authentication when you want to use SQL Server from ASP. Much better to use SQL Server authentication. That way, if you personally have permissions set with SQL Server, then you can use your same username and password in connecting via ASP as you do when just connectiing with any of the SQL Server tools. Consistency.
 
Old August 17th, 2009, 08:11 PM
ldp ldp is offline
Registered User
 
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default iuser account

Yes - I have added that account. I do mean iuser_ldp which corresponds to your suggestion.

I still get the error.
 
Old August 17th, 2009, 09:13 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Huh...sure looks like you did it all correctly.

I guess I just gave up on integrated authentication early on and haven't used it in quite a while. So I forget what other problems I had. Sorry.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft OLE DB Provider for ODBC Drivers phantom3008 Classic ASP Basics 6 March 15th, 2007 09:39 AM
MS OLE DB Provider For "Sql Server"/"ODBC Drivers" ZArrinPour SQL Server 2000 1 April 20th, 2006 09:30 AM
Microsoft OLE DB Provider for ODBC Drivers error ' rajiv_software Classic ASP Basics 6 April 28th, 2005 12:52 AM
Microsoft OLE DB Provider for ODBC Drivers surendran Classic ASP Databases 4 October 27th, 2003 10:23 AM
OLE DB Provider for ODBC Drivers error '80004005' Routhg Access ASP 2 June 11th, 2003 07:02 AM





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