SQL Server中,Price:长度5,精度5,小数位数2,类型为:numeric
Access中, Price:数值范围8,精度5,小数位数2,类型:数字
当我用语句:
str1="Price";
m_cPriceHigh.GetWindowText(str0);
m_cPriceLow.GetWindowText(str2);
strsql.Format(_T("SELECT * FROM Book where %s>='%s' and %s<='%s'"),str1,str2,str1,str0);在SQL Server没有问题,在Access里面就不行啦,总是提示数据库连接不上,为什么?