Create Proc CrearNuevoAnuncio
@Titulo varchar(250),
@Precio int,
@Descripcion varchar(250),
@IDCategoria int,
@IDImagen int,
@Login varchar(200)
AS
INSERT INTO Anuncio VALUES(
@Titulo,
@Precio,
@Descripcion,
@IDCategoria,
@IDImagen,
@Login
)
The error is because the table anuncio has 1 more attribute: "idAnuncio". It's the primary key, and it's the indentity (autoincrement).
So, how can I handle this is the missing thing is an Identity. I don't want to pass that parameter from my front-end.