摘要:
public static DataTable SelectSqlReturnTable(string sql, CommandType type, SqlParameter[] pars) { SqlConnection con = new SqlConnection(ConnString); SqlDataAdapter sda = new SqlDataAdapter(sql, con); sda.SelectCommand.CommandType = type; if (pars != nul... 阅读全文
摘要:
存储过程:-- =============================================-- Author: netboy-- Create date: 2012年7月18日-- Description: 通过cid得到用户一级密码-- =============================================CREATE PROC [dbo].[GETONEPED] @C_ID nvarchar(50), @onepwd nvarchar(50) outputASBEGIN select @onepwd = C_OneP... 阅读全文
摘要:
带参数的SqlDataAdapter : using (SqlConnection con = new SqlConnection("server=.; database=data; integrated security=SSPI;")) { using (SqlCommand com = con.CreateCommand()) { com.CommandText = "select Age from T_User where UserName=@n... 阅读全文