Alter Table command in T-SQL

Results 1 to 2 of 2

Thread: Alter Table command in T-SQL

  1. #1
    Join Date
    Dec 1969

    Default Alter Table command in T-SQL

    I am trying to add a field to a table within a t-SQL<BR>stored procedure. The syntax I am using is <BR> Alter table myTable<BR> add newfield real<BR><BR>The problem that is occuring is that my stored procedure <BR>does not recognize the alter command immediately after <BR>I alter the table. Is there a special command that I must add so that it saves the field. Or should I use a timer. <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default suggestion

    I noticed this problem if I change a table structure and try to compile a SP directly in SQL Server. I need to close the SP window and open it again and it works.....<BR><BR>I am guessing for ASP scripting, try closing the recordset you are using to alter the table. You might even want to try to close the connection to force a refresh on the connection too... Just a guess though... I will check to see if there is a command....<BR><BR>Paulee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts