int day=88888888; 
pConn->Execute("INSERT  INTO  Information (day1)  values(  " & day & "  )",NULL,adCmdText); 
为什么会报错? 
        “&”: 非法,左操作数包含“const char [47]”类型
另外sql server 怎么才能才数据库的末尾插入数据?

解决方案 »

  1.   

    --单引号试下
    INSERT  INTO  Information (day1)  values(  '& day & ' ),
      

  2.   

    不行  我插入的int类型的变量
      

  3.   

    insert into Information (day1) select day
      

  4.   

    pConn->Execute("INSERT  INTO  Information (day1)  values(  " & day & "  )",NULL,adCmdText); 你这个是程序中的原因吧,&有问题
      

  5.   

    简单的拼接错误。
    CString day="88888888";
      

  6.   

    上面是其一,其二:pConn->Execute("INSERT  INTO  Information (day1)  values(  " + day + "  )",NULL,adCmdText);