采用ADO方式插入字段类型为money,bit的记录时,如何写insret语句格式啊?着急着急,来帮下忙吧!
如题:用下面的%s转化类型插步进去啊,请问该用啥类型呢?
count=sprintf(p,"insert into book (bookid,bookname,bwriter,btype,bpublic,bprice");
p+=count;
count=sprintf(p,") values ('%s'",m_BookId);
p+=count;
count=sprintf(p,",'%s'",m_BookName);
p+=count;
count=sprintf(p,",'%s'",m_Author);
p+=count;
count=sprintf(p,",'%s'",m_Kind);
p+=count;
count=sprintf(p,",'%s'",m_Press);
p+=count;
count=sprintf(p,",'%s'",m_Price);
p+=count;
count=sprintf(p,") ");
p+=count;
/* count=sprintf(p,",'%s'",m_Price);
p+=count;
count=sprintf(p,",'%s'",m_Number);
p+=count;
count=sprintf(p,",'%s'","1");
p+=count;
count=sprintf(p,",'%s'","25.5");
p+=count;
count=sprintf(p,",'%s'","1");
p+=count;
count=sprintf(p," ) ");
p+=count;
count=sprintf(p,",%s",m_Author);
p+=count;
count=sprintf(p,",%s",m_Kind);
p+=count;
count=sprintf(p,",%s",m_Press);
p+=count;
count=sprintf(p,",%s",m_Price);
p+=count;
count=sprintf(p,",%s",m_Number);
p+=count;
count=sprintf(p,",%d",1);
p+=count;
count=sprintf(p,",%f",25.5);
p+=count;
count=sprintf(p,",%d",1);*/
*p='\0';
try
{
gpMSSQLCon->Execute(sql,NULL,NULL);
}