Solved

Hash sign in table name problems

Posted on 2001-07-11
5
441 Views
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.
e.g.
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?
0
Comment
Question by:VB-tinkerer
[X]
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
5 Comments
 
LVL 7

Expert Comment

by:weesiong
ID: 6275655
VB-tinkerer,

Try this:

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

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

Regards,
Wee Siong

0
 
LVL 20

Accepted Solution

by:
Silvers5 earned 150 total points
ID: 6275743
fast comment..\

try:

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..

0
 
LVL 49

Expert Comment

by:DanRollins
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
0
 

Expert Comment

by:SpideyMod
ID: 8492588
per recommendation.

SpideyMod
Community Support Moderator @Experts Exchange
0

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

Suggested Solutions

Title # Comments Views Activity
FileUp - Classic ASP 5 27
Date on a table 16 46
ASP sending two datas 2 30
Can't select treeview node from iframe 2 54
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

759 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