Posted on: 5/14/2013 4:21:43 PM | Views : 250

I don't know to get id increment using trigger just insert table. It has error:
"
Procedure or function OutputId_Insert has too many arguments specified. "
This is my sql:
Create proc OutputId_Insert @ID varchar(10) output, @Name nvarchar(10), @Content nvarchar(50) As Insert into AB(ID,Name,Content) Values (@ID,@Name,@Content) And Code C#:
Cmd.Parameters.AddWithValue("@ID", 1);//Insert any character into table AB, when insert trigger will change ID by string format Cmd.Parameters.AddWithValue("@Name",txtName.Text); Cmd.Parameters.AddWithValue("@Content",txtContent.Text); SqlParameter ma = new SqlParameter("@ID", SqlDbType.VarChar); ma.Size = 10; ma.Value = 1; ma.Direction = ParameterDirection.Output; Cmd.Parameters.Add(ma); Cmd.ExecuteNonQuery(); string sma = (string)ma.Value; lbl.Text = "ID: " + sma; Hope many people help me.
T ...

Go to the complete details ...