這篇文章主要介紹了vc 6 mysql如何使用c接口訪問mysql,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。
基本開發(fā)就不講了,以下主要是出現(xiàn)的幾個(gè)問題,提供一下解決方法:
1. 找不到c:mysqlshareindex?.conf
Some mysql struct information (size and offset):
net: 292 0
host: 4 296
port: 4 400
protocol_version: 4 412
thread_id: 4 392
affected_rows: 8 368
packet_length: 4 396
status: 4 512
fields: 4 332
field_alloc: 32 336
free_me: 1 516
options: 84 428
File 'c:mysqlsharecharsets?.conf' not found (Errcode: 2)
Character set '#33' is not a compiled character set and is not specified in the
'c:mysqlsharecharsetsIndex' file
Can't connect to the mysql server on port 3306 !
Press any key to continue
這主要是字符集的問題,需要設(shè)置連接的數(shù)據(jù)庫的字符集
2.協(xié)議錯(cuò)誤,無法連接.
修改設(shè)置user 表password為old_password('dddd')
3.中文問題
if(mysql_query(&myData, "set names gbk")){
fprintf(stderr, "%d: %sn",
mysql_errno(&myData), mysql_error(&myData));
}
感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“vc 6 mysql如何使用c接口訪問mysql”這篇文章對大家有幫助,同時(shí)也希望大家多多支持創(chuàng)新互聯(lián),關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道,更多相關(guān)知識等著你來學(xué)習(xí)!