同样的SQL语句,在ACCESS里可以查出,在VB6里就查不出来,该如何解决
同样的SQL语句,在ACCESS里可以查出,在VB6里就查不出来
sql语句如下:
SELECT ec_id,nf_id,s_price,c_price,f_price,cz,n_length,n_date,b_name,unit_name,t_type,p_plate from materiel,m_brand,m_plate,m_type,m_unit where materiel.b_id = m_brand.b_id and materiel.p_id = m_plate.p_id and materiel.t_id =m_type.t_id and materiel.unit_id = m_unit.unit_id and (ec_id like '*K10707201* ' or nf_id like '*K10707201* ')
------解决方案--------------------
改*号为%号
sql语句如下:
SELECT ec_id,nf_id,s_price,c_price,f_price,cz,n_length,n_date,b_name,unit_name,t_type,p_plate from materiel,m_brand,m_plate,m_type,m_unit where materiel.b_id = m_brand.b_id and materiel.p_id = m_plate.p_id and materiel.t_id =m_type.t_id and materiel.unit_id = m_unit.unit_id and (ec_id like '*K10707201* ' or nf_id like '*K10707201* ')
------解决方案--------------------
改*号为%号