PC Review


Reply
Thread Tools Rate Thread

Colum naming conventions

 
 
=?Utf-8?B?Uml0YUs=?=
Guest
Posts: n/a
 
      21st Feb 2005
Hi,

Hope someon can help with this one. I have added column names with spaces
dynamically into SQLServer 2000, eg. Order Details. This appears as [Order
Details] on the server and everything looks fine. However when I go to
Insert or Update data using the data adapter, it doesn't find the column.
What is it doing.

Thanks
RitaK
 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      21st Feb 2005
RitaK,

I don't know what it is doning, however I would never give datafield names a
name seperated by a space. Is it not now I will become in trouble, than
probably tomorrow.

(And therefore I never had your problem)

OrderDetails is very nice in my opinion.

Just my thought,

Cor


 
Reply With Quote
 
Paul Clement
Guest
Posts: n/a
 
      22nd Feb 2005
On Sun, 20 Feb 2005 19:59:03 -0800, "RitaK" <(E-Mail Removed)> wrote:

¤ Hi,
¤
¤ Hope someon can help with this one. I have added column names with spaces
¤ dynamically into SQLServer 2000, eg. Order Details. This appears as [Order
¤ Details] on the server and everything looks fine. However when I go to
¤ Insert or Update data using the data adapter, it doesn't find the column.
¤ What is it doing.

If you have space embedded tables names they will have to be enclosed with brackets or single quote
characters (this will depend upon the database type).


Paul ~~~ (E-Mail Removed)
Microsoft MVP (Visual Basic)
 
Reply With Quote
 
Robbe Morris [C# MVP]
Guest
Posts: n/a
 
      23rd Feb 2005
While supported in SQL Server by putting [my column name] this instead
of my column name, if you try to do any sort of object mapping to your
ADO.NET code (as demonstrated in the source code generator for ADO below),
you'll run into all sorts of problems.

You are much better off in the long run naming your columns like so:

FirstName
LastName
SomeOtherColumnName

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/foru...t10017013.aspx
http://www.eggheadcafe.com/articles/..._generator.asp



"RitaK" <(E-Mail Removed)> wrote in message
news:C189F117-6091-4FBD-B90B-(E-Mail Removed)...
> Hi,
>
> Hope someon can help with this one. I have added column names with spaces
> dynamically into SQLServer 2000, eg. Order Details. This appears as [Order
> Details] on the server and everything looks fine. However when I go to
> Insert or Update data using the data adapter, it doesn't find the column.
> What is it doing.
>
> Thanks
> RitaK



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best naming conventions Andy B. Microsoft VB .NET 7 8th Feb 2009 02:04 PM
Naming conventions? Allan Ebdrup Microsoft C# .NET 5 9th Jun 2005 01:05 PM
Naming Conventions Mark Microsoft Windows 2000 Active Directory 3 4th Sep 2004 05:45 PM
Naming Conventions Tony Williams Microsoft Access 3 2nd Sep 2003 05:54 PM
Re: Naming Conventions? GVaught Microsoft Access 0 29th Aug 2003 06:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:31 PM.