Wrox Programmer Forums
| 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 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
  #1 (permalink)  
Old May 16th, 2012, 03:57 PM
Registered User
Points: 35, Level: 1
Points: 35, Level: 1 Points: 35, Level: 1 Points: 35, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Classic ASP: SQLSetConnectAttr Failed

I am using MySQL and classic ASP to add/edit/update records through a web page. I have a database that was recently switched over to a Server 2008 environment. Since the switch I am having a very strange problem. When updating more than 790 records (used LIMIT to check the tolerance) I receive the error message below:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
/aRPTS/mlist/add_list_BB.asp, line 8

That line is:
Set ConnSQL = Server.CreateObject("ADODB.Connection")

I have a feeling it is a permission problem, IIS-wise, using root access for the DB itself, or possibly a "buffer" limit but I can't figure it out.

I can read thousands or records just fine in this particular app and in ANOTHER app on the same server with the same connection string (different database name) I can successfully insert/update thousands (40k) of records. It appears to be an isolated issue with this folder/database.

Any suggestions would be appreciated.
  #2 (permalink)  
Old May 17th, 2012, 11:14 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

80004005 errors are almost always related to security. For more details:

http://imar.spaanjaars.com/263/how-d...0004005-errors

On Windows Server the account you use is *probably* something like IIS AppPool\NameOfTheAppPool. The part before the slah is fixed, the second part should be the name of the ppol. You can find out if this is indeed the account by looking at the site so see which pool it uses, and then look at the settings of the app pool and see if the identity is set to ApplicationPoolIdentity.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #3 (permalink)  
Old May 17th, 2012, 12:00 PM
Registered User
Points: 35, Level: 1
Points: 35, Level: 1 Points: 35, Level: 1 Points: 35, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the response.

The application pool is just the DefaultAppPool and is the same as other apps within my default website that are working fine. It is indeed set to ApplicationPoolIdentity as well. I went through the link but couldn't follow to well as I am using IIS7. As far as the permissions are concerned I have everything wide open though. Any other suggestions would be appreciated.
  #4 (permalink)  
Old May 17th, 2012, 12:05 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
I have everything wide open though
Can you define wide open? Does IIS AppPool\DefaultAppPool have write access to the folder that contains the databse, not to just the database file itself?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #5 (permalink)  
Old May 17th, 2012, 12:28 PM
Registered User
Points: 35, Level: 1
Points: 35, Level: 1 Points: 35, Level: 1 Points: 35, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The folder is set to full access to Everyone and the other applications in my website using the DefaultAppPool don't have this issue.

Could it possibly come from a corrupt database?

Last edited by lithgowers; May 17th, 2012 at 12:34 PM..
  #6 (permalink)  
Old May 17th, 2012, 12:38 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Are you using a DSN for your connection? And did you recreate that on the new server? Googling for "Driver's SQLSetConnectAttr failed" seems to suggest DSN related issues.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #7 (permalink)  
Old May 17th, 2012, 12:49 PM
Registered User
Points: 35, Level: 1
Points: 35, Level: 1 Points: 35, Level: 1 Points: 35, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not using DSN, I am using an ODBC connection string. I did set up the DSN to see if I could get it to work that way but it still throws the same error.
  #8 (permalink)  
Old May 17th, 2012, 03:03 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

In that case, I am almost out of ideas. Stuff you could try:

1. See if the application pool runs in 32 or 64 bit mode. It might work on 32 bits
2. Use an OLEDB connection string.
3. See if Google brings up more results for the exact error message.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
  #9 (permalink)  
Old May 17th, 2012, 03:05 PM
Registered User
Points: 35, Level: 1
Points: 35, Level: 1 Points: 35, Level: 1 Points: 35, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the input, I'll give those suggestions a shot and post a response if I can get it to work in case other run into such an issue. Thanks again!
  #10 (permalink)  
Old May 18th, 2012, 10:42 AM
Registered User
Points: 35, Level: 1
Points: 35, Level: 1 Points: 35, Level: 1 Points: 35, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Tried all of the suggestions but to no avail. Unfortunately Google is of little to no help, the forums were my last resort. I'll keep the post up to date if I manage to solve it. I think my next step is to recreate the database and test again to see if the DB is corrupt.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert classic ASP - Web API code to ASP.NET melvik ASP.NET 3.5 Professionals 0 February 24th, 2012 03:02 PM
using asp.net code in classic ASP (audit log) rockstar283 Classic ASP Basics 0 November 17th, 2010 03:48 PM
classic ASP to ASP.NET 2.o XML coding rupen XML 10 May 18th, 2010 03:09 AM
[ODBC] Driver's SqlSetConnectAttr Failed ruzlymoh BOOK: Beginning SQL 0 September 24th, 2008 08:50 AM
Driver's SQLSetConnectAttr failed saulodet ADO.NET 2 January 5th, 2004 01:28 PM





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