时间:2021-07-01 10:21:17 帮助过:15人阅读
string sProc = "p_Sample"; string sqlConnection = "Data Source=.;Initial Catalog=DataBaseSample;User ID=sa;PassWord=123456"; using (SqlConnection conn = new SqlConnection(sqlConnection)) { SqlCommand cmd = new SqlCommand(sProc, conn);
cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataSet dt = new DataSet(); adapter.Fill(dt); if(dt.Tables[0].Rows[0][0] != null) { return (int)dt.Tables[0].Rows[0][0]; } else { return 0; } }
Dynamics CRM - 使用 C# Plugin 调用 SQL 存储过程
标签:查询 提高 alt turn HERE spro from man end