为什么这样查出来的结果不对???
为什么这样查出来的结果不对??? 比如查1000,查到的结果只能是大于1000的,等于1000的没有列出来.代码如下:
string j1 =Session[ "jj1 "].ToString();
string j2 =Session[ "jj2 "].ToString();
int jj1=0,jj2=1000000;
if(j1.Length != 0)
{ jj1 = Convert.ToInt32(j1,16);}
if(j2.Length != 0)
{jj2 = Convert.ToInt32(j2,16);}
myCommand = new OleDbCommand( "select jj FROM lpan where (jj> = "+jj1+ " and jj <= "+jj2+ ") ", myConnection );
------解决方案--------------------转换的问题 jj1 = Convert.ToInt32(j1,16);
改成 jj1 = Int32.Parse(j1);
jj2同样处理.