Solved

Hash sign in table name problems

Posted on 2001-07-11
5
439 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
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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