Creating a new field in MS SQL server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Maziar Aflatoun

    Creating a new field in MS SQL server

    Hi,

    Does anyone know how I can create/remove table fields in Microsoft SQL
    server using C# code?

    Thank you
    Maziar A.


  • William Ryan

    #2
    Re: Creating a new field in MS SQL server

    Assuming you have the permissions to allow you to do this, simple use a
    stringbuilder to construct a DDL statement and set the commandtext of your
    command object to it, coupled with an ExecuteNonQuery ...


    "Maziar Aflatoun" <maz88@rogers.c om> wrote in message
    news:9Drtb.7105 8$Rah1.67074@tw ister01.bloor.i s.net.cable.rog ers.com...[color=blue]
    > Hi,
    >
    > Does anyone know how I can create/remove table fields in Microsoft SQL
    > server using C# code?
    >
    > Thank you
    > Maziar A.
    >
    >[/color]


    Comment

    Working...