|
 |
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |
|

May 16th, 2012, 03:57 PM
|
Registered User
|
|
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

May 17th, 2012, 11:14 AM
|
 |
Wrox Author
Points: 72,055, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
|
|
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
|

May 17th, 2012, 12:00 PM
|
Registered User
|
|
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

May 17th, 2012, 12:05 PM
|
 |
Wrox Author
Points: 72,055, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
|
|
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
|

May 17th, 2012, 12:28 PM
|
Registered User
|
|
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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..
|

May 17th, 2012, 12:38 PM
|
 |
Wrox Author
Points: 72,055, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
|
|
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
|

May 17th, 2012, 12:49 PM
|
Registered User
|
|
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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. 
|

May 17th, 2012, 03:03 PM
|
 |
Wrox Author
Points: 72,055, Level: 100 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
|
|
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
|

May 17th, 2012, 03:05 PM
|
Registered User
|
|
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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!
|

May 18th, 2012, 10:42 AM
|
Registered User
|
|
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
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
|
|
|
|
 |