如题:
String phone = Session[ "phone "].ToString();
String strSQL = "SELECT CALLED_NBR,CALLED_AREA_CODE,START_TIME,CHARGE,DURATION FROM MOBILE_CALL_TICKET_ZRY WHERE CALLING_NBR= " + phone;
phone已经定义为字符型变量,为何这里还会报错:标准表达式中数据类型不匹配
请大家忙看看
------解决方案--------------------------------------------------------
....calling_nbr= ' " + phone + " ' ";
你的sql语句少了个 ' '