/// <summary>
/// 判斷用戶是否存在
/// </summary>
/// <param name=
/// <param name=
/// <returns></returns>
public int UserExists(string P_Str_Name
SqlConnection myConn = dbObj
SqlCommand myCmd = new SqlCommand(
myCmd
//添加參數
SqlParameter Name = new SqlParameter(
Name
myCmd
SqlParameter Password = new SqlParameter(
Password
myCmd
SqlParameter returnValue = myCmd
SqlDbType
returnValue
//執行過程
myConn
try {
myCmd
}
catch (Exception ex) {
throw (ex)
}
finally {
myCmd
myConn
}
int P_Int_returnValue = Convert
return P_Int_returnValue;
}
From:http://tw.wingwit.com/Article/program/net/201311/13851.html