vc连接mysql数据库的方法:首先打开VC6;然后在中间列表框中添加本地安装MySQL的include目录路径;接着选中“Library files”并添加MySQL的Lib目录路径;最后进行编程测试即可...mysql_real_connect(&mysql,”localhost”,”myuser”,”123456″,”student_db”,3306,NULL,0))
printf(“\n连接数据库时发生错误...\n”);
else
printf(“\n连接数据库成功!...mysql_real_connect(&mysql,”localhost”,”myuser”,”123456″,”student_db”,3306,NULL,0))
printf(“\n连接数据库时发生错误...\n”);
else
printf(“\n连接数据库成功!