Home >Database >Mysql Tutorial >c++用odbc连接mysql到SQLConnect()返回-1?

c++用odbc连接mysql到SQLConnect()返回-1?

WBOY
WBOYOriginal
2016-06-06 09:32:441772browse

mysqlodbc

retcode = SQLConnect(hdbc, (SQLCHAR*) "mysql", SQL_NTS, (SQLCHAR*)"root", SQL_NTS, (SQLCHAR *)"mysql", SQL_NTS);
mysql是安装的最新版本,同时自带安装了ODBC,然后代码连接:
https://msdn.microsoft.com/zh-cn/library/ms711810.aspx
希望好心人帮忙调试下。
QQ:185354748

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn