欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

sqlserver未找到列

程序员文章站 2022-03-07 17:32:48
...

DataTable objDataTable = new DataTable(); DataColumn dc; dc = new DataColumn("CustomerCode"); objDataTable.Columns.Add(dc); ViewState["ERPSystemApplicationTargetlist"] = objDataTable; DataTableo = (DataTable)ViewState["ERPSystemApplication

DataTable objDataTable = new DataTable();
DataColumn dc;

dc = new DataColumn("CustomerCode");
objDataTable.Columns.Add(dc);

ViewState["ERPSystemApplicationTargetlist"] = objDataTable;

DataTable o = (DataTable)ViewState["ERPSystemApplicationTargetlist"];

string customerCode ="111";

o.Select("CustomerCode=" + customerCode)

报错:未找到列 [111]。

请问错在哪里了。