CLR存储过程

| 我希望在CLR存储过程中使用加密API。 我创建了一个CLR存储过程并编写了一条select语句
SqlConnection conn = new SqlConnection();
conn.ConnectionString = \"Context Connection=true\";
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = @\"select * from Employee\";

SqlDataReader rdr = cmd.ExecuteReader();
现在,我希望使用员工编号来过滤结果,该员工编号以加密形式存储在数据库中,而我将使用密码方法。 现在,我将继续研究如何过滤来自ѭ1的记录。 我希望返回格式为“ 1”,因为要从CLR存储过程返回多个记录,有一个方法“ 3”,该方法仅接受“ 1”对象。 请指导我。     
已邀请:
我正在寻找一个类似的问题,我想在返回结果之前进行一些操作。 我目前看到的唯一方法是使用:
// Note you need to pass an array of SqlMetaData objects to represent your columns
// to the constructor of SqlDataRecord

SqlDataRecord record = new SqlDataRecord();

// Use the Set methods on record to supply the values for the first row of data
SqlContext.Pipe.SendResultsStart(record);

// for each record you want to return
// use set methods on record to populate this row of data

SqlContext.Pipe.SendResultsRow(record);
完成后,呼叫ѭ6。 如果有更好的方法,我也想知道!     

要回复问题请先登录注册