|
|
 |
| 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.
|
 |

August 13th, 2009, 09:38 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

August 17th, 2009, 07:05 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

August 17th, 2009, 08:55 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 Posts
|
|
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.
|

August 17th, 2009, 09:11 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
iuser account
Yes - I have added that account. I do mean iuser_ldp which corresponds to your suggestion.
I still get the error.
|

August 17th, 2009, 10:13 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,323
Thanks: 3
Thanked 70 Times in 69 Posts
|
|
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |