存储过程为:
CREATE PROCEDURE `sp_query`()
BEGIN
select * from cdm_project_info;
END$$DELIMITER ;在程序中通过传递“call sp_query();”调用mysql_query时会报如下错误:
“PROCEDURE testdb.sp_query can't return a result set in the given context”
CREATE PROCEDURE `sp_query`()
BEGIN
select * from cdm_project_info;
END$$DELIMITER ;在程序中通过传递“call sp_query();”调用mysql_query时会报如下错误:
“PROCEDURE testdb.sp_query can't return a result set in the given context”
if (mysql_real_connect (conn, opt_host_name, opt_user_name, opt_password,
opt_db_name, opt_port_num, opt_socket_name, opt_flags) == NULL)
{
print_error (conn, "mysql_real_connect() failed");
mysql_close (conn);
exit (1);
}