参数类型不对
有一个字符串,str = "select bookid,bookname from bookinfo where bookid='aaa' "; 我想把其中的 “aaa”用一个整形数字代替(如23),变成 str = "select bookid,bookname from bookinfo where bookid='23' ";
该怎么操作?我下面的操作为什么老是说参数类型不对?该怎么转换?
long id = 23;
CString strSql = "select bookid,bookname from bookinfo where bookid='aaa' ";
CString strID;
strID.Format("%d", id);
strSql.Replace("CopyRightText", strID);