2-3 words in field name

G

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?
 
E

Erland Sommarskog

Goran said:
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, (e-mail address removed)

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
 
D

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top