Adding a column to an SQL database

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2006
Posts: 23
Reputation: furjaw is an unknown quantity at this point 
Solved Threads: 0
furjaw furjaw is offline Offline
Newbie Poster

Adding a column to an SQL database

 
0
  #1
Apr 22nd, 2007
Visual Basic 2005
How do I go about adding a column to an SQL database.
Everytime I did it in the past it was a disaster and I literally had to start all over again from square one.
I would go into Dataset Designer to add the column then I would have all kinds of problems with the form that displays the DataGridView and would have to recreate the form from scratch.
I don't want to recreate the form because it is working fine with the users not entering anything in the BirthDate field and I can't remember what I did to keep it from insisting that a date be entered.
I am not talking about adding the column programmatically.
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 23
Reputation: furjaw is an unknown quantity at this point 
Solved Threads: 0
furjaw furjaw is offline Offline
Newbie Poster

Re: Adding a column to an SQL database

 
0
  #2
Apr 22nd, 2007
Visual Basic 2005
I used DataSet Designer to add a column called "Case#" to an existing SQL table.
The table is used by a DataGridView in a VB 2005 program.
I got it working on my development computer in debug mode.
Then, when I installed it, I got an exception "Case# is an invalid column" and none of my data records appeared.

Adding the following statement did not help:
PatientDataSet.Patient.Columns.Add("Case#")
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 216
Reputation: jamello is an unknown quantity at this point 
Solved Threads: 6
jamello's Avatar
jamello jamello is offline Offline
Posting Whiz in Training

Re: Adding a column to an SQL database

 
0
  #3
Apr 25th, 2007
Hey! Methinks the use of a character like "#" is the problem.
Do not include this kind of character or any of the following in your table name(*&%$#@!). It should work. Please get back to me.
Originally Posted by furjaw View Post
Visual Basic 2005
I used DataSet Designer to add a column called "Case#" to an existing SQL table.
The table is used by a DataGridView in a VB 2005 program.
I got it working on my development computer in debug mode.
Then, when I installed it, I got an exception "Case# is an invalid column" and none of my data records appeared.

Adding the following statement did not help:
PatientDataSet.Patient.Columns.Add("Case#")
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC