Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP Error 0x80004005 Unspecified error when using ADODB.RecordSet

Posted on 2004-04-26
14
Medium Priority
?
2,509 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 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