Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 15th, 2003, 03:54 PM
Anton Anton is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 Anton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What prevents me from reading the msysobjects tbl?

Hello,<br><br>I've created an asp page that connects to an MS Access database. I want to read the contents of the msysobjects table and display it on the screen.<br>Problem is, I can connect to user tables just fine, but Access system tables won't display their data, even when they are visible from the database.<br><br>I believe there is either something wrong with my database security setup or there is something wrong with the connection string I'm using. Does anyone have information on how to read the msysobjects system table from an asp page and display its contents on the screen?<br><br>Here's a snippet of my code: (If you replace 'msysobjects' in the recordset below, with a user created table, the code executes just fine.)<br><br><%<br><br><br> Dim DatabaseConnection<br> dim rsQueryObjects<br><br> 'Open Database and DSNless connection<br> '====================================<br> Set DatabaseConnection = Server.CreateObject("ADODB.Connection")<br> Set rsQueryObjects = Server.CreateObject("ADODB.Recordset")<br><br> DatabaseConnection.Open "DBQ=" & Server.Mappath("MyAccess.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;MaxBufferSize=8192;Threads=20 ;", "Admin", "Password"<br><br> rsQueryObjects.Open "Select * from msysobjects where type = 5;", DatabaseConnection, 1, 3<br><br> If not rsQueryObjects.EOF then<br><br> rsQueryObjects.MoveFirst<br><br> end if<br><br>%><br><br>Thank you for your help.<br>Anton

Reply With Quote
  #2  
Old May 15th, 2003, 04:48 PM
dcarva's Avatar
dcarva dcarva is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 633 dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level)dcarva User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 9 h 18 m 20 sec
Reputation Power: 6
These links might help:<br><br>http://www.codeguru.com/mfc_database/access_reports_class_msysobjects.shtml<br>http://www.urfinjus.net/UJ2/CTR_Dnld.asp

Reply With Quote
  #3  
Old May 15th, 2003, 05:06 PM
Anton Anton is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 Anton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Silly me,<br><br>I hadn't set read permissions on the msysobjects table.<br><br>Select Tools-Options-View-Show-System objects, Click OK<br>(this makes the system object tables visible)<br><br>Select Tools-Security-User and group Permissions<br>Select MSysObjects from object names<br>Add 'Read Design' and Read Permissions<br><br>My code worked just fine after that.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > What prevents me from reading the msysobjects tbl?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway