Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 18th, 2006, 10:12 AM
Authorized User
 
Join Date: Oct 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default list of ms access stories queries in asp

I have been searching and found out that stored procedures are called stored queries in access

This is an interesting link

http://www.stardeveloper.com/article...1050101&page=1

but i still havent found how to retrieve a list of ms access stored queries in asp... anyone know?
 
Old December 18th, 2006, 12:28 PM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Open a query.

Right-click on the header and switch to SQL View

Paste this in and take a look at the datasheet

SELECT MSysObjects.Name, MSysObjects.Type, MSysObjects.Connect
FROM MSysObjects
WHERE (((MSysObjects.Type)=5))
ORDER BY MSysObjects.Name;


Interesting reading for you....
http://www.perfectparadigm.com/tip001.html

Regards,

Sean Anderson
 
Old December 18th, 2006, 08:37 PM
Authorized User
 
Join Date: Oct 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks...

I have tried to run this code

Code:
<%
Dim rsUsers, adminID

  set rsUsers=Server.CreateObject("ADODB.Recordset")
  strSQL = "SELECT MSysObjects.Name, MSysObjects.Type, MSysObjects.Connect FROM MSysObjects WHERE (((MSysObjects.Type)=5))ORDER BY MSysObjects.Name;" 
  rsUsers.open strSQL, strConnectAdmin

%>
but get the following access error...

Microsoft JET Database Engine error '80040e09'

Record(s) cannot be read; no read permission on 'MSysObjects'.

How do i setup permission on this?

Thanks

 
Old December 18th, 2006, 08:50 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

As a result od primarily using SQL Server, I have limited access experience however have never seen your above error stating a tble name.

Have you set permissions on the folder where your .mdb file is? Give the IUSR read and write permissions
to this location. however I seen to remember the error is more like:
'can not use an updatable query' (or something like that)

Wind is your friend
Matt
 
Old December 18th, 2006, 09:06 PM
Authorized User
 
Join Date: Oct 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah I have set permissions for IUser i am sure its not that,

I have been looking on google and others have had the problem, just not sure how they solved it!

 
Old December 18th, 2006, 09:21 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Are you successfully getting records on any page?
I suspect it what you have in your connection string, are using a UN and PW? I dont, and use:
"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/data/dbName.mdb")
What does your look like?


Wind is your friend
Matt
 
Old December 18th, 2006, 11:29 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

To elaborate on Matts point a bit more, if you are using a DSN and providing a username and password to connect to the database it may have to do with the user account that you are using to connect to the database. In SQL Server, for example, I could get this error if the SQL user i am using to connect to the database does not have permissions to execute any commands on that table.

Try this tho, run that code inside Access itself, not from code, and see if it executes. It it does you can narrow it down, fairly well, to it being a permissions issue from calling this query in code.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature





Similar Threads
Thread Thread Starter Forum Replies Last Post
VB Net Ms Access list column names (how to sample) jhkraft VB Databases Basics 2 March 13th, 2008 03:27 PM
List Box Fliter MS Access VBA hewstone999 Access VBA 1 February 29th, 2008 09:01 AM
Access issues with ASP and a MS Access Database rj_conceptsnrec.com Classic ASP Databases 2 May 19th, 2005 12:44 PM
MS Access Queries LDFProfessions Access 5 April 14th, 2005 07:35 AM
writing SQL queries in MS access,VBA NovieProgrammer Access VBA 2 April 2nd, 2005 07:15 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.