Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Problem Displaying Recordset from Access DB

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,37
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Problem Displaying Recordset from Access DB
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Problem Displaying Recordset from Access DB - 5/23/2001 7:42:36 AM   
  pagooda

 

Posts: 54
Score: 0
Joined: 5/23/2001
From: USA
Status: offline
Hi,

I'm having trouble displaying the contents of my recordset. My ASP script connects to my DSN called 'webreport'. This file is on a server drive D:\. D:\ is the physical drive on the server. My client machine has full privileges to it.

It seems I'm able to open my connection alright, but when I attempt to execute my SQL query, I get the error '80004005 - Unspecified error' on my set rs = myconn.execute(sqltext). I know this error can mean several different things, from permissions to illegal usage of objects, but I'm sort of new to ASP and I'm not an NT Admin.

I've done quite a bit of research, and I've given my ISUR_<machinename> full access to both the database I'm connecting to, and the directory where both the database and my ASP script reside. I just can't seem to make this out.

Following is my code:



<html><head><title>Reading Contents of Database</title></head>
<body>
<%
'**************************
'OPEN DATABASE CONNECTION
'**************************
'create connection to database using dsn
set myconn = Server.CreateObject("ADODB.Connection")
myconn.open "FILEDSN=d:\inetpub\wwwroot\logs\webreport.dsn"

'search database with query
sqltext = "SELECT * FROM Access-log"
set rs = myconn.execute(sqltext)

While Not rs.eof
response.write "<br>" & rs("IP_Address") & rs("User_ID") & "<br>"
rs.movenext
WEnd

rs.close
myconn.close
%>
</body>
</html>



Thanks in advance for your help. I really appreciate it.
 
 
Post #: 1
 
 Re: Problem Displaying Recordset from Access DB - 5/23/2001 7:44:22 AM   
  adminkoe

 

Posts: 117
Score: 0
Joined: 12/23/2000
From:
Status: offline
where Access-log is the name of your table, eh??

And it's definitely the name of the table?

Try:
sqltext = "SELECT * FROM [Access-log]"

maybe that hyphen is confusing it.

(in reply to pagooda)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Problem Displaying Recordset from Access DB Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts