Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. 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 Professional 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
  #11 (permalink)  
Old February 21st, 2009, 06:49 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Unfortunately, the error number 80004005 is simply indicating that some code some place (likely the driver) tried to access memory that didn't exist (e.g., it tried to read location zero?) or tried to write to read-only memory.

So the number, per se, is kind of useless. You have to HOPE that the error message--which is produced by the underlying code when it traps an exception of that type number--is correct and meaningful.

Now... You say that READING from this same DB works fine??? Are you possibly connecting to a ".mdf" SQL Server Express file? Is it possible that this file is, indeed, in a directory that is read-only??? Remember, whether it is read-only or not can apply to the "user" that tries to access it. That user will *NOT* be YOU. It might be IUSR_xxx (the IIS/ASP/ADO user) or it might be the SQL Server Express user (dunno what its name is).

Can you write to this DB/table from, say, a query manager kind of tool? Not using ASP at all?
  #12 (permalink)  
Old February 21st, 2009, 09:08 PM
Registered User
 
Join Date: Feb 2009
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default ODBC Drivers error '80004005'

Thanks Old Pedant,

I am connecting to an *.mdf file. I'll check to see what the permissions are on the directory. I was also curious as to how I would see the underlying error message that got trapped. Would this be a try/catch scenario to see the underlying message?

I think I may have actually made my situation worse yesterday, but I haven't had an opportunity to verify yet. I don't think I can even select from the tables any more.

Regards,

Radfo
  #13 (permalink)  
Old February 21st, 2009, 11:09 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, I showed the way to get the most info possible in my Sept. 18th post. By looking at the Connection.Errors collection.

But don't be too surprised if that tells you nothing.

One thing you can start with is giving the "EVERYONE" user full permissions (Read/Write/Execute) in that directory and to that ".mdf" file. That will at least tell you if it indeed is a permissions problem. If it is, later you can try to figure out what the "right" user is to grant those permissions to.
  #14 (permalink)  
Old February 22nd, 2009, 04:36 AM
Registered User
 
Join Date: Feb 2009
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default ODBC Drivers error '80004005'

I changed the permissions on both the file and the directory and I still got the same message. What I did find out is that the server 'D89SMLF1\SQLEXPRESS' doesn't exist, but .\SQLEXPRESS does. In my connection setup, it says .\SQLEXPRESS without the computer name. In my error message it says that it can't find 'D89SMLF1\SQLEXPRESS' which makes sense since it doesn't exist. Can I tell SQL Server that it does exist or can I tell my code not to use the computer/server name when connecting to the SQLEXPRESS?

When I use the syntax RS = server.createobject, is it putting the server name in the syntax? My connection open statement doesn't use the copmuter/server name, I just use the dot slash before SQLEXPRESS.

Does ASP connect to the SQL Express server or does it read the *.mdf file directly?

Thanks again Old Pedant. I appreciate your patience.

Radfo
  #15 (permalink)  
Old February 23rd, 2009, 12:57 AM
Registered User
 
Join Date: Feb 2009
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default ODBC Drivers error '80004005'

Update to my last Post.

I did a select @@servername from my database and I got the server name that i was connected to. I used this information to update my connection string so that the server=.\SQLEXPRESS; and WSID=servername and my error message is still the same in that it says - Could not find server 'D89SMLF1\SQLEXPRESS' in sys.servers. I set the WSID to equal my server name (PE860) so why is it still showing a different server (DSMLF1)? How do I tell it to use the server name I found in SQL Express query? When i put the server name found in the query, before SQLEXPRESS in the connection string, it really can't find anything.

Any help would be greatly appreciated.

Thanks.

Radfo
  #16 (permalink)  
Old February 23rd, 2009, 03:18 AM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

You've got me. I've had problems with SQL Server Express, before, but never this weird.

FWIW, of course ASP/ADO connects to the SQL Server Express "server". Nobody outside of that server would have any inkling of how to read a database file.

On my own machine, the connection is to "BILL\SQLEXPRESS" (yeah, BILL is my username on the machine...how edifying). And it works just fine. Sorry!
  #17 (permalink)  
Old February 23rd, 2009, 08:51 AM
Registered User
 
Join Date: Feb 2009
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Exclamation ODBC Drivers error '80004005'

Thanks again Old Pedant.

My ASP.NET apps seem to work just fine on this server. This app also worked just fine on my Windows XP computer running IIS. I'm wondering if it's some sort of security issue I'm fighting on the server. It's a hosted server that was setup by the hosting company. I can change things, but I don't know what to change to make it work.

FWIW, I also showed the connection string for the Connection (Conn.open) and the recordset, and the connection string for both say the WSID is PE860, but immediately after running the command RS.Update I get the error from below that says the wrong server (server with a different name differentserver\SQLEXPRESS) can't be found.

If I'm running the app on the same server as the database, do I need to enable the TCP/IP connection or is it a shared memory connection? Again, my ASP.net apps are working fine.

Regards,

Radfo

Last edited by radfo; February 23rd, 2009 at 08:54 AM..
  #18 (permalink)  
Old February 23rd, 2009, 05:01 PM
Registered User
 
Join Date: Feb 2009
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Exclamation ODBC Drivers error '80004005'

Update to Previous post.

I had my Hosting Provider take a look at my SQL Server (since they installed it) and here is what they told me.

For
some reason, it now thinks typing D89SMLF1\SQLEXPRESS is connecting to a remote
database which is disabled in SQL Server 2005 Surface Area Configuration.
Hopefully this will help someone figure out what the problem is with my app. It's really killing me.

Thanks.

Radfo
  #19 (permalink)  
Old February 23rd, 2009, 07:00 PM
Registered User
 
Join Date: Feb 2009
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Default

Did a select @@servername from the database and it reports a different name from the D89SMLF1\SQLEXPRESS that is being reported by the error message, could that be the problem? This is a production server and I don't want to make the situation worse by just trying anything. Again, all of my ASP.NET apps seem to be working fine.

Thanks.
  #20 (permalink)  
Old February 23rd, 2009, 07:25 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

You are REALLY out of my area here, but...

I *think* your hosting company is telling you "you can't do that." *THEY* are the ones that set up your SQL Server [that is the actual server] on a different machine, no doubt. [I use GoDaddy, and that's what they do...they have hundreds if not thousands of users from many different web servers all connected to one or a few DB servers...keeps the cost of licensing SQL Server down for them, I'm sure.] And now that you are trying to use a ".mdf" file, you are hosed.

But I think this may be time to punt. Try asking the questions at http://www.SQLTeam.com -- That's where the real SQL Server pros hang out. Much more likely to get an answer there than here, I think. Be sure to give them all the background you have now discovered.

Good luck!




Similar Threads
Thread Thread Starter Forum Replies Last Post
0x80004005 ODBC Error in ASP Script hbansal ASP.NET 1.0 and 1.1 Basics 1 September 12th, 2008 03:09 PM
Error Type:Server.MapPath(), ASP 0171 (0x80004005) phantom3008 ASP.NET 1.0 and 1.1 Basics 2 April 26th, 2007 02:28 PM
Error Type: (0x80004005) Unspecified error wilfree Classic ASP Databases 3 April 3rd, 2007 09:04 AM
(0x80004005) Unspecified error MiltonAbreu Classic ASP Components 6 July 7th, 2004 11:34 AM





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