•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 391,697 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,148 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser:
Views: 1893 | Replies: 2
![]() |
•
•
Join Date: Mar 2006
Posts: 22
Reputation:
Rep Power: 3
Solved Threads: 0
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.
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.
•
•
Join Date: Mar 2006
Posts: 22
Reputation:
Rep Power: 3
Solved Threads: 0
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#")
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#")
•
•
Join Date: Oct 2006
Location: somewhere in West-Africa
Posts: 196
Reputation:
Rep Power: 2
Solved Threads: 6
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.
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#")
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb VB.NET Marketplace
•
•
•
•
.net .net framework 3.0 access ajax asp avatar backup breach code combo custom daniweb data data protection database design developer development dropdownlist government hacker ibm medicine microsoft module msdn net news normalization office reuse security server skin software sql survey theme vista web windows workflow
- SQL Database loop (C#)
- Insert into sql database (ASP.NET)
- Process very slow - SQL Database (MS SQL)
- Addition 2 column in sql (MS SQL)
- Help with Roles Stored in SQL database (ASP.NET)
- Snyc'n Local SQL database online (MS SQL)
Other Threads in the VB.NET Forum
- Previous Thread: Check Whether The Next Attribute Is Exists Or Not?
- Next Thread: Changing font to bold in datagrid at runtime


Linear Mode