Home > Microsoft SQL Server > What prevents me from reading the msysobjects tbl?

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

    
Guest


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

Was this answer helpful ? Yes No   
Guest


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.

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved