我无法从MS Access数据库中选择自动编号列,因为我一直收到此错误:
标准表达式中的数据类型不匹配
我根本不知道应该在我的SQL语句中添加什么类型(int,string,double,long ...)以匹配自动编号列?
PS:我是初学者
这是我的代码:
string d = (string)Session["gouser"];
string b = (string)Session["profile"];
string s = (string)Session["stanum"]; // this is the auto number and its taken as a string
int y = 0;
Int32.TryParse(s, out y);
double X = y;
DataTable m;
m = DAL.SelectFromTable(" Select * FROM [Status] WHERE [user]='" + b + "' AND [number]='" + X + "'");