p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 13th, 2009, 09:38 PM
ldp ldp is offline
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old August 15th, 2009, 12:05 PM
Friend of Wrox
Points: 1,882, Level: 17
Points: 1,882, Level: 17 Points: 1,882, Level: 17 Points: 1,882, Level: 17
Activity: 7%
Activity: 7% Activity: 7% Activity: 7%
 
Join Date: May 2004
Location: India
Posts: 563
Thanks: 0
Thanked 14 Times in 14 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old August 17th, 2009, 07:05 PM
ldp ldp is offline
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old August 17th, 2009, 08:55 PM
Friend of Wrox
Points: 4,805, Level: 29
Points: 4,805, Level: 29 Points: 4,805, Level: 29 Points: 4,805, Level: 29
Activity: 38%
Activity: 38% Activity: 38% Activity: 38%
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old August 17th, 2009, 09:11 PM
ldp ldp is offline
Registered User
Points: 12, Level: 1
Points: 12, Level: 1 Points: 12, Level: 1 Points: 12, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #6 (permalink)  
Old August 17th, 2009, 10:13 PM
Friend of Wrox
Points: 4,805, Level: 29
Points: 4,805, Level: 29 Points: 4,805, Level: 29 Points: 4,805, Level: 29
Activity: 38%
Activity: 38% Activity: 38% Activity: 38%
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft OLE DB Provider for ODBC Drivers phantom3008 Classic ASP Basics 6 March 15th, 2007 10:39 AM
MS OLE DB Provider For "Sql Server"/"ODBC Drivers" ZArrinPour SQL Server 2000 1 April 20th, 2006 10:30 AM
Microsoft OLE DB Provider for ODBC Drivers error ' rajiv_software Classic ASP Basics 6 April 28th, 2005 01: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 08:02 AM



All times are GMT -4. The time now is 06:17 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc