public static SqlConnection getConnection()
{
return new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]);
}public bool checkName(string userName)
{
SqlConnection con = Connection.getConnection();
SqlCommand userCommand = new SqlCommand("checkName", con);
cmd.CommandType = CommandType.StoredProcedure;//采用存储过程
}我用的是vs03为什么CommandType. 后面的StoredProcedure 跳不出来 而要自己手动打进去 是不是代码哪里写错了?
{
return new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]);
}public bool checkName(string userName)
{
SqlConnection con = Connection.getConnection();
SqlCommand userCommand = new SqlCommand("checkName", con);
cmd.CommandType = CommandType.StoredProcedure;//采用存储过程
}我用的是vs03为什么CommandType. 后面的StoredProcedure 跳不出来 而要自己手动打进去 是不是代码哪里写错了?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货