Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using MSQuery to reference a db with a reserved word name

Status
Not open for further replies.

BrendaCowell

Technical User
Jul 13, 2010
4
US
We are trying to set up some queries using MSQuery to read a database named "OPEN". Because OPEN is a reserved word, I get the error: "Incorrect syntax near the keyword 'OPEN'. Statement(s) could not be prepared."
If I modify the sql statement to add brackets to OPEN (i.e. [OPEN]), the query will run, but can no longer be displayed graphically. As my users do not know sql, I'm trying to find a way around this. Is there a config file or setting that I can change somewhere?
note: this database has many applications referencing it, so changing the name is not an option.
Thanks!
Brenda
 


Hi,
As my users do not know sql, I'm trying to find a way around this.
My users know next to nothing about SQL. Why should that make a difference? Are you not designing the report for their consumption?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
My position here has a limited duration. I'm initially setting up a few reports for them, but want "to teach them to fish" so they can modify these reports, and create new ones as the need arises.
 



This is a round about option, and I'm not sure it would work.

Create an MS Access database. LINK your OPEN table. RENAME the table in the Access db. Then MS Query the OPEN table thru the MS Access renamed table.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,
We are able to access the db that way. We won't be using this as a workaround in this case, however, as we are trying to limit points of failure in a process often broken due to workarounds used in the past. Wish I could go back in time to the person who named this database and suggest another name!
Thanks,
Brenda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top