ASP 101 - Active Server Pages 101 - Web04
The Place ASP Developers Go!



Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash



 Top ASP 101 Stories Top ASP 101 Stories
Connections, Commands, And Procedures
What is ASP?
VBScript Classes: Part 1 of N

QUICK TIP:
Basic Debugging in Classic ASP
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates


Quick Tips


Bracket Your [Table Names] for Access via OLE DB

I recently got an email from a user who thought that he should share something he ran across when trying to switch from ODBC to OLE DB for his Access database queries. Here's a excerpt from the email:

To use the OLE DB provider with a Microsoft Access database, all SQL references to table names must be surrounded in [square brackets]! This foiled me for months. As a result, most of my sites are still using OBDC because I couldn't get them to work with OLE DB until I figured this out. The worst part is that many weird and unhelpful errors were generated and not one of them mentioned this. I note that most of your examples do not do this, presumably because it's not necessary in SQL Server, but it definitely is when using OLE DB with Access.

ex. SQL = "SELECT * FROM [tblBinData] WHERE ... ;"

Definitely an important tip. While the brackets aren't needed for SQL Server, they don't hurt anything either, so feel free to go ahead and use the brackets even if you're only using Access temporarily. Thanks go out to Gary Snow for writing in and sharing this tip.


Previous      Show All Tips      Next

If you have a tip you would like to submit, please send it to: webmaster@asp101.com.


Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers