Create Proc [dbo].[SP_GetUserNumber] ( @UserID AS VARCHAR(10)= '', @RetValue As VARCHAR(50) OUTPUT ) As BEGIN select @RetValue=MobNumber from tbl_User where userid=@UserID END
SqlConnection sqlcon = new SqlConnection(ConfigurationManager.AppSettings["SQLConn"]); SqlParameter[] SqlParam = new SqlParameter[2]; SqlParam[0] = new System.Data.SqlClient.SqlParameter("@UserID", SqlDbType.VarChar); SqlParam[0].Value = strUserID; SqlParam[1] = new System.Data.SqlClient.SqlParameter("@RetValue", SqlDbType.VarChar); SqlParam[1].Direction = ParameterDirection.Output; int i = SqlHelper.ExecuteNonQuery(sqlcon, "SP_GetUserNumber", SqlParam); string[] arReturnParms = new string[1]; arReturnParms[0] = SqlParam[1].Value.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)