944,198 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 5206
  • VB.NET RSS
Apr 22nd, 2007
0

Adding a column to an SQL database

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
furjaw is offline Offline
23 posts
since Mar 2006
Apr 22nd, 2007
0

Re: Adding a column to an SQL database

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#")
Reputation Points: 10
Solved Threads: 0
Newbie Poster
furjaw is offline Offline
23 posts
since Mar 2006
Apr 25th, 2007
0

Re: Adding a column to an SQL database

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.
Click to Expand / Collapse  Quote originally posted by furjaw ...
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#")
Reputation Points: 215
Solved Threads: 6
Posting Whiz in Training
jamello is offline Offline
219 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Check Whether The Next Attribute Is Exists Or Not?
Next Thread in VB.NET Forum Timeline: Changing font to bold in datagrid at runtime





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC