public string UserInfo(string strUserID, string strPassword)
{
string result_value = string.Empty;
try
{
dbConn = new SqlConnection(strConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = dbConn;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "RF_0001";
cmd.Parameters.Add("@P_USER_ID", SqlDbType.VarChar, 20);
cmd.Parameters.Add("@P_USER_PWD", SqlDbType.VarChar, 10);
cmd.Parameters.Add("@O_WORK_DATE", SqlDbType.VarChar, 8);
cmd.Parameters.Add("@O_USER_NM", SqlDbType.VarChar, 10);
cmd.Parameters.Add("@O_USER_INFO", SqlDbType.VarChar, 20);
cmd.Parameters.Add("@O_MSG", SqlDbType.VarChar, 255);
cmd.Parameters["@P_USER_ID"].Value = strUserID;
cmd.Parameters["@P_USER_PWD"].Value = strPassword;
cmd.Parameters["@O_WORK_DATE"].Direction = ParameterDirection.Output;
cmd.Parameters["@O_USER_NM"].Direction = ParameterDirection.Output;
cmd.Parameters["@O_USER_INFO"].Direction = ParameterDirection.Output;
cmd.Parameters["@O_MSG"].Direction = ParameterDirection.Output;
dbConn.Open();
cmd.ExecuteNonQuery();
result_value = Convert.ToString(cmd.Parameters["@O_USER_NM"].Value);
}
catch (Exception e)
{
return e.Message.ToString();
}
finally
{
dbConn.Close();
}
return result_value;
}
원문 : http://ulgom.net/gomsboard/view.html?t_nm=asp&idx=52&page=1&search=&search_text=