[Log In ] [New Posts] []
Go Back   GotApex? Forums Forums > General Topics > Software, OS, and the Internet
User Name
Password

Reply
 
Thread Tools Search this Thread Display Modes
Old 02-25-2002, 01:22 PM   #1
OC
the admiral formerly known as overclocked
 
OC's Avatar
 
Join Date: Aug 2000
Location: Outside the mainstream
Posts: 5,922
Strange ASP problem

Ok, this is odd. I'm building an ASP app that calls on an Access database. In the database is a table called "grant". In my ASP page I have "Set rGrant = cConn.Execute ("SELECT * FROM grant")"

In this form, I get an error: Syntax error in FROM clause

If I change "grant" to "grants" in the ASP page and in the Access database it work fine.

Is "grant" something special in the world of ASP?

-OC
__________________
But what is adulthood except a delayed end-run around our parents' better judgment?
-- Peter Egan

*cough*
OC is offline   Reply With Quote
Old 02-25-2002, 02:15 PM   #2
ironchef
Commander
 
ironchef's Avatar
 
Join Date: Dec 2000
Location: SF Bay Area
Posts: 1,342
Send a message via ICQ to ironchef Send a message via AIM to ironchef Send a message via MSN to ironchef Send a message via Yahoo to ironchef
bah.. i can't find an exact reference on MSDN, but i'd venture to guess that yes, you stumbled on a reserved word. best to leave it at "grants" or better yet, prefix your tables, forms, queries, and objects with appropriate identifiers (ie, "grant" becomes "tblGrant" or "t_grant")
__________________
blurt blurt blurt
ironchef is offline   Reply With Quote
Old 02-25-2002, 02:21 PM   #3
ironchef
Commander
 
ironchef's Avatar
 
Join Date: Dec 2000
Location: SF Bay Area
Posts: 1,342
Send a message via ICQ to ironchef Send a message via AIM to ironchef Send a message via MSN to ironchef Send a message via Yahoo to ironchef
Aha! We're right:

Code:
GRANT Statement Grants specific privileges to an existing user or group. Syntax GRANT {privilege[, privilege, …]} ON {TABLE table | OBJECT object| CONTAINER container } TO {authorizationname[, authorizationname, …]} ---------------------------------------------------------------------- The GRANT statement has these parts: Part Description privilege -- The privilege or privileges to be granted. Privileges are specified using the following keywords: SELECT, DELETE, INSERT, UPDATE, DROP, SELECTSECURITY, UPDATESECURITY, DBPASSWORD, UPDATEIDENTITY, CREATE, SELECTSCHEMA, SCHEMA and UPDATEOWNER. tablename -- Any valid table name. object -- This can encompass any non-table object. A stored query (view or procedure) is one example. container -- The name of a valid container. authorizationname -- A user or group name.
ironchef is offline   Reply With Quote
Old 02-25-2002, 03:22 PM   #4
OC
the admiral formerly known as overclocked
 
OC's Avatar
 
Join Date: Aug 2000
Location: Outside the mainstream
Posts: 5,922
Thanks cheffy!

-OC
OC is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump


All times are GMT -7. The time now is 08:07 AM.