Link to home
Start Free TrialLog in
Avatar of VB-tinkerer
VB-tinkerer

asked on

Hash sign in table name problems

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?
Avatar of weesiong
weesiong

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

ASKER CERTIFIED SOLUTION
Avatar of Michel Sakr
Michel Sakr
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
per recommendation.

SpideyMod
Community Support Moderator @Experts Exchange