Can I change a column name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am new to VB 2005 Express Edition.

I created an SQL Server database according to steps in my book, but I
mispelled one of the column names (typo).

Is it possible to rename the column or is it better to delete the table
completely and retrace my steps to bring me back to where I am now?

Thanks for your help,

Joy
 
Joy said:
I am new to VB 2005 Express Edition.

I created an SQL Server database according to steps in my book, but I
mispelled one of the column names (typo).

Is it possible to rename the column or is it better to delete the table
completely and retrace my steps to bring me back to where I am now?

Thanks for your help,

Joy

It depends...
Have you made reference to the misspelled column name in your code? If so,
you'll obviously have to change all references. Other than that, changing
the column name should not be a problem.
 
It is me again.

I did 2 things.

Found the table in the Database Explorer.
RC on the table name > Open Table Definition
I changed the column name in the Table Definition and saved it.
I closed the Table Definition.

Then I went to the Data Sources tab, and got the database diagram back
I renamed the column and saved it.

The changes are reflected in the Database Explorer and the Data Sources tab.

Is this enough to rename a column?
I haven't used the fields in any code yet, I am just building my connection
to the SQL Server database.

Thanks,

Joy
 
Joy,

In the case of the untyped datatable this is no problem at all. As soon as
you start working with the typed datatable (generated code) than you will
have to use the edit and replace to correct that.

Cor
 
Back
Top