use the output parameter of the stored procedure ... then in your VB Code instead of parameterinput change it to output direction.. see BOL for VB.NET Code on Using Stored Procedures.in your SPCREATE PROCEDURE Sample(@inputvar datatype,@RetCode INT OUTPUT)sample code that uses OUTPUT in C#, we use application blocks for this one: SqlParameter[] parameters = {new SqlParameter("@imID", System.Convert.ToInt32(imID.Trim())), new SqlParameter("@cpID", cpID.Trim()), new SqlParameter("@subCode", subCode.Trim()), new SqlParameter("@itemCode", itemCode.Trim()), SqlAccessor.SqlParameterBuilder("@RetID", SqlDbType.VarChar,20, ParameterDirection.Output), SqlAccessor.SqlParameterBuilder("@RetcpID", SqlDbType.Char,3, ParameterDirection.Output), SqlAccessor.SqlParameterBuilder("@RetSubCode", SqlDbType.Char,3, ParameterDirection.Output), "If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside. "
raclede