Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / August 2006



Tip: Looking for answers? Try searching our database.

ADO Field names in querries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lou - 24 Aug 2006 15:46 GMT
If a field name has a space in it (my field)
should a query use
[my field] or
"my field"

both seem to work?
will different ODBC (DSN) drivers need different syntax
Oracle
Access
SQL

What should I use to be able to work with any DB?

-Lou
Douglas J. Steele - 24 Aug 2006 22:44 GMT
I don't think you'll be able to get a definitive answer on this one.

Some DBMS won't allow spaces in the field names. Why not save the
aggravation, and remove them?

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> If a field name has a space in it (my field)
> should a query use
[quoted text clipped - 10 lines]
>
> -Lou
Ralph - 25 Aug 2006 04:02 GMT
> I don't think you'll be able to get a definitive answer on this one.
>
> Some DBMS won't allow spaces in the field names. Why not save the
> aggravation, and remove them?

I'm glad someone said it.

I have been in the business for 25+ years, and in that time everyone I have
ever worked with that piddled with spaces in Field/Table names came to
regret it.

The sad part is most go that route because they think they are saving
development time as the field is already "formatted" for display or more
"readable". But in fact they end up paying and paying and paying. <g>

-ralph
Lou - 26 Aug 2006 23:46 GMT
The problem is that I am dealing with databases other people put together,
like Access by simple users.
So, does anyone have an answer. Brackets or quotes?

>> I don't think you'll be able to get a definitive answer on this one.
>>
[quoted text clipped - 13 lines]
>
> -ralph
Ralph - 27 Aug 2006 05:24 GMT
> The problem is that I am dealing with databases other people put together,
> like Access by simple users.
> So, does anyone have an answer. Brackets or quotes?

Brackets until you run into something that breaks, then try quotes.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.