Stuart Kirk

Stuart Kirk

  • NA
  • 3
  • 0

Add Columns with ADO.Net parameters

Dec 14 2009 4:28 PM

Hi guys,

Due to previous poor database design, I need to maintain the columns of a table using ADO. I'd like to execute an anonymous procedure to do this, parameterising the column name to add.

Is it possible?

DECLARE @pLang Name
ALTER TABLE Languages
ADD @pLang varchar(254)

1 attempt above, this gives the error "Incorrect syntax near '@pLang'" but I think it gives an idea of what I want to achieve.

Any help greatly appreciated...