服务器人数多的时候出现Column XXXX does not belong to table

liudong0001 liudong0001 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
服务器人数多的时候出现Column XXXX does not belong to table

代码没问题,

最主要的是全是查询语句出现的,返回是datetable类型

更奇怪的是Column XXXX does not belong to table
这个页面执行的时候压根没有这个表,更别说这个字段
刷新的时候这个页面要不就是出现
Column A does not belong to table1
Column A does not belong to table2
Column b does not belong to table3

还有Internal connection fatal error
does not contain a property with the name
等等

上传服务器,人多了就会出现,刷新1下,出现不一样的报错

Server Error in '/' Application.
--------------------------------------------------------------------------------

DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'type'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'type'.


很郁闷啊!!!求大神解决

上传1下DLL,就好啦,过一会又出现这个问题,时好时坏。


代码如下:

public static SqlCommand cmd = null;
public static SqlConnection conn = null;
public static string connstr = Maticsoft.DBUtility.PubConstant.GetConnectionString("connstr");
public SQLHelper()
{ }
#region 建立数据库连接对象
/// <summary>
/// 建立数据库连接
/// </summary>
/// <returns>返回一个数据库的连接SqlConnection对象</returns>
public static SqlConnection init()
{
try
{
conn = new SqlConnection(connstr);
if (conn.State != ConnectionState.Open)
{
conn.Open();
}
}
catch (Exception e)
{
throw new Exception(e.Message.ToString());
}
return conn;
}
#endregion

#region 设置SqlCommand对象
/// <summary>
/// 设置SqlCommand对象
/// </summary>
/// <param name="cmd">SqlCommand对象 </param>
/// <param name="cmdText">命令文本</param>
/// <param name="cmdType">命令类型</param>
/// <param name="cmdParms">参数集合</param>
private static void SetCommand(SqlCommand cmd, string cmdText, CommandType cmdType, SqlParameter[] cmdParms)
{
cmd.Connection = conn;
cmd.CommandText = cmdText;
cmd.CommandType = cmdType;
if (cmdParms != null)
{
cmd.Parameters.AddRange(cmdParms);
}
}
#endregion
#region 执行不带参数sql语句,返回一个DataTable对象
/// <summary>
/// 执行不带参数sql语句,返回一个DataTable对象
/// </summary>
/// <param name="cmdText">相应的sql语句</param>
/// <returns>返回一个DataTable对象</returns>
public static DataTable GetDataTable(string cmdText)
{

SqlDataReader reader;
DataTable dt = new DataTable();
try
{
init();
cmd = new SqlCommand(cmdText, conn);
reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
dt.Load(reader);
reader.Close();
conn.Close();//---
}
catch (Exception ex)
{
throw new Exception(ex.Message.ToString());
}
return dt;
}
#endregion

#region 执行带参数的sql语句或存储过程,返回一个DataTable对象
/// <summary>
/// 执行带参数的sql语句或存储过程,返回一个DataTable对象
/// </summary>
/// <param name="cmdText">sql语句或存储过程名</param>
/// <param name="cmdType">命令类型</param>
/// <param name="cmdParms">参数集合</param>
/// <returns>返回一个DataTable对象</returns>
public static DataTable GetDataTable(string cmdText, CommandType cmdType, SqlParameter[] cmdParms)
{
SqlDataReader reader;
DataTable dt = new DataTable();
try
{
init();
cmd = new SqlCommand();
SetCommand(cmd, cmdText, cmdType, cmdParms);
reader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
dt.Load(reader);
reader.Close();
conn.Close();//---
}
catch (Exception ex)
{
throw new Exception(ex.Message.ToString());
}
return dt;
}
#endregion


大家看看那里有问题吗,谢谢大神门

...全文

相关推荐

Number of shape does not match the number of table records解决方法

ArcGIS修复损坏的shapefile,解决Number of shape does not match the number of table records的问题

qiny011

Linux网络启动问题:Device does not seem to be present解决办法

Linux网络启动问题:Device does not seem to be present解决办法 在整虚拟机时候经常会遇到虚拟机拷贝,然而拷贝之后网络配置会遇到错误 service network restart启动网络时候提示如下错误: Device does not seem to be present 解决步骤 1、ifconfig -a 查看当前网卡 2、修改网络配置文件, vi /etc/sysconfig/network-scripts/ifcfg-eth0 在原来文件的基础上,修改网卡名称为DEVICE=eth1 并且把UUID以及mac地址删掉 3、mv ifc

weixin_38656297

rsync同步时出现rsync: failed to set times on “xxxx”: Operation not permitted

今天在同步数据的时候提示rsync: failed to set times on “xxxx”: Operation not permitted,一般来说要不是服务器时间不对或者权限没有设置好

weixin_38515573

does not exist.解决/root/.Xauthority does not exist

解决/root/.Xauthority does not exist

lj_70596

运行Sqoop出现hcatalog does not exist!…accumulo does not exist!解决方案

有一段时间没用sqoop了,今天打开进行测试的时候,发现命令行总是出现下面这样的警示信息: Warning: /opt/module/sqoop/bin/…/…/hcatalog does not exist! HCatalog jobs will fail. Please set $HCAT_HOME to the root of your HCatalog installation. Warning: /opt/module/sqoop/bin/…/…/accumulo does not exist! Accumulo imports will fail. Please set $ACCU

weixin_38543280
评论 17
收藏 已收藏
分享
返回顶部
liudong0001
.NET社区 62,271 成员 668,968 内容