Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Hash sign in table name problems

Posted on 2001-07-11
Medium Priority
Last Modified: 2012-08-14
I have an Access Database whith a table name that contains a hash sign [BASIC#1]

My SQL statements work well when executed in MS-Query, but when I put the database onto the webserver, I get errors because of the hash sign.  I assume that the hash sign has some special meaning in ODBC or an other layer.
SQL = "SELECT * FROM [BASIC#1] WHERE ([BASIC#1].[ID]=" & request.form("ID") & ")"

Is there a way of avoiding this problem - apart from renaming the table?
Question by:VB-tinkerer
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6275655

Try this:

SQL = "SELECT * FROM BASIC#1 WHERE (ID=" & request.form("ID") & ")"

And if canot work, tell me what error you got!

Wee Siong

LVL 20

Accepted Solution

Michel Sakr earned 600 total points
ID: 6275743
fast comment..\


SQL = "SELECT * FROM [BASIC##1] WHERE [ID]=" & request.form("ID")

also try to response.write the SQL statement before the execution to see what's in it.. maybe the form field is empty..

LVL 49

Expert Comment

ID: 8451599
Upon review of the comments here, I am recommending this disposition:

        points to Silvers5

Please post a comment if you disagree.

DanRollins -- EE database cleanup volunteer

Expert Comment

ID: 8492588
per recommendation.

Community Support Moderator @Experts Exchange

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question