CREATE PROCEDURE NewAlbbild @firma VARCHAR(200), @sprachid INT, @beschreibung VARCHAR(200), @actid INT OUTPUT AS INSERT INTO albbild (firma,sprachid,beschreibung) VALUES (@firma,@sprachid,@beschreibung) SELECT @actid = @@IDENTITY FROM albbild GOIn VB.NET I create the command the following way:
... oSelect=NEW SqlClient.SqlCommand("NewAlbbild",oConnect) oSelect.CommandType=CommandType.StoredProcedure With oSelect.Parameters .Add("@firma","TEST") .Add("@sprachid",1) .Add("@beschreibung","HALLO") .Add("@actid",0) Endwith oSelect.Parameters("@actid").Direction=ParameterDirection.Output oSelect.ExecuteNonQuery() nActId=oSelect.Parameters("@actid").ValueI get an error when executing the command stated above - either '...Parameter "@actid" is missing...' or '...an error occured...'.