Im trying to work out a way for users to be able to add new columns to tables in an SQL Server database through Dreamweaver.
I have tried using stored procedures but i keep getting errors. The user will choose which table they wish to add a column then give that column a name and datatype. I just cant get it to work so i tried to go back to basics and not use stored procedures but just code the SQL stating the tablename, columnname and datatype. This seems to work :-
<% set addcolumn = Server.CreateObject("ADODB.Command") addcolumn.ActiveConnection = MM_Silverwingdatabase_STRING addcolumn.CommandText = "ALTER TABLE dbo.customer ADD newcolumn VarChar(50)" addcolumn.Execute() %>
how can I change this so the user can choose the table and then give the column a name and datatype? or even my next step... how can i change this so the user can just enter the tablename?
any ideas would be great!!!!! Ive been working on this for a long time and need to get it to work ASAP!