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.

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#")

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.

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#")

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.