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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
points to Silvers5
Please post a comment if you disagree.
DanRollins -- EE database cleanup volunteer
per recommendation.
SpideyMod
Community Support Moderator @Experts Exchange
SpideyMod
Community Support Moderator @Experts Exchange
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