theApp.sql="insert into tbl_function(name_Chinese,ID_factory) values('"+m_function_name+"','"+m_selected_factory_ID+"')";报错:error C2593: 'operator +' is ambiguous怎么办?只插入一个字段的信息这样写又可以:
theApp.sql="insert into tbl_function (name_Chinese) values('"+m_function_name+"')";我的变量声明是这样:
CString m_function_name;
_variant_t m_selected_factory_ID;

解决方案 »

  1.   

    theApp.sql ="insert into tbl_function(name_Chinese,ID_factory) values('";
    theApp.sql = theApp.sql+m_function_name;
    theApp.sql = theApp.sql+"','";
    theApp.sql = theApp.sql +m_selected_factory_ID;
    theApp.sql  = theApp.sql  ++"')";
    试一下 =
      

  2.   

    还是不行,还是那个问题。我觉得是我的变量声明有问题:_variant_t m_selected_factory_ID;
    应该把m_selected_factory_ID声明成一个字符串型的,但是怎样把数据表里的
    int型的数据读入一个字符型的变量呢?急!!!