22,209
社区成员
发帖
与我相关
我的任务
分享
string CustomerName= "批发商"; //笔误?加上CustomerName
DataTable dt = new DataTable();
SqlCommand comm = new SqlCommand("sp_GetCustomerInfo", conn.Conn);
comm.CommandType = CommandType.StoredProcedure;
comm.Parameters.Add("@ADRLIN1", SqlDbType.NVarChar, 500);
comm.Parameters["@ADRLIN1"].Value = CustomerName; //你CustomerName哪里来的?
comm.Parameters["@ADRLIN1"].Direction = System.Data.ParameterDirection.Input;
SqlDataAdapter adapter = new SqlDataAdapter(comm);
adapter.Fill(dt);
if (conn.Conn.State == ConnectionState.Open)
{
conn.Conn.Close();
}