Sunday, February 19, 2012

Help me please i have a problem in ALTER command

Dear all

I need to add new column in table TranPay , I use ALTER command on PDA on Button Click

Dim SqlStm = "ALTER TABLE TranPay ALTER COLUMN TranKey IDENTITY (1, 1)"

Dim Dcmd As SqlCeCommand = New SqlCeCommand

Dcmd.Connection = Conn

Dcmd.CommandText = SqlStm

Dcmd.ExecuteNonQuery()

But cannot create new Field , Help me please

Brg ,

Tingnong

Try this:

ALTER TABLE TranPay ALTER COLUMN TranKey int IDENTITY(1,1)

You must specify the column data type.|||

Try this:

Code Snippet

ALTER TABLE TranPay ADD TranKey int IDENTITY (1,1)

No comments:

Post a Comment