vc 6 mysql使用c 接口访问mysql

基本开发就不讲了,以下主要是出现的几个问题,提供一下解决方法:

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

这主要是字符集的问题,需要设置连接的数据库的字符集

2.协议错误,无法连接.

修改设置user 表password为old_password('dddd')

3.中文问题

if(mysql_query(&myData, "set names gbk")){
fprintf(stderr, "%d: %sn",
mysql_errno(&myData), mysql_error(&myData));
}

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/197458/viewspace-1032856/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/197458/viewspace-1032856/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值