?
Solved

ASP Error 0x80004005 Unspecified error when using ADODB.RecordSet

Posted on 2004-04-26
14
Medium Priority
?
2,496 Views
Last Modified: 2012-08-14
I have an ASP Page using this code:
--begin
          Dim rs
            Set rs = Server.CreateObject("ADODB.RecordSet")
      Dim sql
          Dim conn
          Dim h
          h = 20
            conn="PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=\\data\warehouse\db\Weather.mdb"
               
          sql = "SELECT [Code], [Temp], [FLike], [Cond], [Icon], [City], [Sort] FROM [tblWeather] ORDER BY [Sort]"
          
            rs.Open sql, conn, 1, 3

-end

IIS Is returning this error:
0x80004005 Unspecified error

Both the data server and the IIS server are part of the same domain. The user running the ASP pages in IIS has access to the mdb file.  The mdb file is not currently locked (no ldb).  There is no one in the database.

The only way I can get this to work is to have an Administrator run the page.  I have restarted the server, triple checked the database, everything!

Do any of you have any help?

Travis
0
Comment
Question by:wtconway
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 4
14 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 10919625
try change
    conn="PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=\\data\warehouse\db\Weather.mdb"
to
    conn.open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=\\data\warehouse\db\Weather.mdb"


hongjun
0
 
LVL 33

Expert Comment

by:hongjun
ID: 10919638
also before the .open method, do this

set conn = server.createobject("ADODB.Connection")
0
 
LVL 10

Expert Comment

by:Shailesh15
ID: 10919679
change the connection .. It may solve..

 conn="Driver={Microsoft Access Driver (*.mdb)};Dbq=\\data\warehouse\db\Weather.mdb;Uid=admin;Pwd="

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 10

Expert Comment

by:Shailesh15
ID: 10919699
Oops!.. hongjun is right you are missing open statement..

conn.open "Driver={Microsoft Access Driver (*.mdb)};Dbq=\\data\warehouse\db\Weather.mdb;Uid=admin;Pwd="
0
 
LVL 7

Author Comment

by:wtconway
ID: 10920172
I added that and no help.  I am still getting the error.

Any other ideas?  Maybe I should have this moved to the IIS board.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 10920184
what is your latest code?
0
 
LVL 7

Author Comment

by:wtconway
ID: 10920491
         Dim rs
            Set rs = Server.CreateObject("ADODB.RecordSet")
            Dim sql
          Dim conn
          Set conn = Server.CreateObject("ADODB.Connection")
          Dim h
          h = 20
            conn.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=\\data\warehouse\db\Weather.mdb"
               
          
          sql = "SELECT [Code], [Temp], [FLike], [Cond], [Icon], [City], [Sort] FROM [tblWeather] ORDER BY [Sort]"
          
            rs.Open sql, conn, 1, 3
                                                 ..........................
            rs.Close
            
            %>
            <div style="top: 15px; left: 190px; position:absolute; width: 450px; height: 490px; ">
                  <b><%
                  
                  sql = "SELECT [TimeAdded], [Text], [Visible], [Page] FROM [tblText] WHERE [Visible]=""Y"" AND ([Page]=""ALL"" OR [Page]=""CORP"") ORDER BY [TimeAdded]"
                  
                  rs.Open sql, conn, 1, 3
                        Do While Not rs.EOF
                              Response.Write("<p align=""justify"">")
                              Response.Write(Replace(rs.Fields("Text"), vbCrLf, "<br>"))
                              Response.Write("</p>")
                              rs.MoveNext
                        Loop
                  rs.Close
                  conn.Close
                  %>
0
 
LVL 10

Expert Comment

by:Shailesh15
ID: 10921391
change the connection to ODBC driver .. It may solve..

conn.open "Driver={Microsoft Access Driver (*.mdb)};Dbq=\\data\warehouse\db\Weather.mdb;Uid=admin;Pwd="
0
 
LVL 7

Author Comment

by:wtconway
ID: 10921451
I tried that earlier.  When I do that I get the following error:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 3.
/google/index.asp, line 65

Line 65 is:
rs.Open sql, conn, 1, 3

In the code above, it is th second instance where I am opening the recordset.
0
 
LVL 10

Expert Comment

by:Shailesh15
ID: 10921560
change
sql = "SELECT [TimeAdded], [Text], [Visible], [Page] FROM [tblText] WHERE [Visible]='Y' AND ([Page]='ALL' OR [Page]='CORP') ORDER BY [TimeAdded]"
0
 
LVL 7

Author Comment

by:wtconway
ID: 10921637
It didn't work.....

I have tried everything now it seems.   I have gone through many many many online resources.... This isn't the first time we have had problems with this machine!  I am starting to really hate MS.  I think we are gonna just have to format this baby and go on.

Travis
0
 
LVL 10

Accepted Solution

by:
Shailesh15 earned 750 total points
ID: 10921695
Copy that mdb in to the ASP dir & run.. just for debugging.. see.if problem is file/pc/network or just ASP!
0
 
LVL 33

Expert Comment

by:hongjun
ID: 10923835
weird.
your sql statement seems ok.
0
 
LVL 7

Author Comment

by:wtconway
ID: 10932129
You know Shailesh,

I just tried that a second ago and it worked... of course, I dont know if it is because of me restarting the server today, but it worked.

I moved the database to another directory (so that people can't just download the mdb from the directory).

I think it may be because this server used to be a PDC and now has been demoted to a SDC and the PDC doesn't allow the communication from this restricted account to a non-DC server. (The IT guys know what this means).

Thanks Guys.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question