Home All Groups Group Topic Archive Search About

2-3 words in field name

Author
20 Dec 2006 8:42 AM
Goran
Can I define field names with more words in Access and SQL Server like
field: "Bus station" instead "BusStation" or "Bus_Station"? I have had
problems because of this in VB6. Can I have problems in VB 2005 or C# 2005
and SQL Server?

Author
20 Dec 2006 8:52 AM
Erland Sommarskog
Goran (gze***@gmail.com) writes:
> Can I define field names with more words in Access and SQL Server like
> field: "Bus station" instead "BusStation" or "Bus_Station"? I have had
> problems because of this in VB6. Can I have problems in VB 2005 or C# 2005
> and SQL Server?

Yes you can. You need to enclose the name in brackets [] or double quotes ""
whenever you use it.


--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Author
20 Dec 2006 10:06 AM
Dave Sexton
Hi,

It's not recommended though.

You shouldn't use the field names as captions if you want something more
readable.  For instance, if you're using a DataSet you can assign the
Caption property to something other than the field name.  In grids you can
easily set the headers at design-time.

--
Dave Sexton

Show quoteHide quote
"Goran" <gze***@gmail.com> wrote in message
news:emat1f$90e$1@sunce.iskon.hr...
> Can I define field names with more words in Access and SQL Server like
> field: "Bus station" instead "BusStation" or "Bus_Station"? I have had
> problems because of this in VB6. Can I have problems in VB 2005 or C# 2005
> and SQL Server?
>