c++ 创建mysql数据库表失败
char*sqlstr="createtableifnotexistsDS_Building(IDVARCHAR(10),NameVARCHAR(255),DescsVA...
char* sqlstr ="create table if not exists DS_Building( ID VARCHAR(10),Name VARCHAR(255),Descs VARCHAR(255),PRIMARY KEY (ID))";
if (0==mysql_real_query(mydata,sqlstr,(UINT)strlen(sqlstr))){
cout<<"success";
}else {cout<<"fail";} 展开
if (0==mysql_real_query(mydata,sqlstr,(UINT)strlen(sqlstr))){
cout<<"success";
}else {cout<<"fail";} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询