全部博文(930)
分类: Mysql/postgreSQL
2010-05-04 20:23:28
int mysql_options(MYSQL *mysql, enum mysql_option option, const char *arg)
描述
可用于设置额外的连接选项,并影响连接的行为。可多次调用该函数来设置数个选项。
应在mysql_init()之后、以及mysql_connect()或mysql_real_connect()之前调用mysql_options()。
选项参量指的是你打算设置的选项。Arg参量是选项的值。如果选项是整数,那么arg应指向整数的值。
对于mysql_optinos的详细选项,请参见文档。这里只列出了一些常用的,具体的使用请参考mysql源码目录下的
mysql-5.1\tests\mysql_client_test.c
my_bool b = 0;
mysql_options(*sql,MYSQL_REPORT_DATA_TRUNCATION,&b);
mysql_options(lmysql, MYSQL_SET_CHARSET_NAME, "gbk");//utf8
my_bool my_true= TRUE;
mysql_options(lmysql, MYSQL_OPT_RECONNECT, &my_true);
mysql_options(&mysql,MYSQL_OPT_COMPRESS,0);
mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"odbc");
chinaunix网友2010-05-31 22:34:44
MBT is based on Africa's indigenous people to create innovative walking barefoot, and wear this shoe can stimulate the body to relax the muscles so that the muscles of heat to be released, consumed calories, thus to achieve weight loss results. MBT's pursuit of beauty in order to satisfy customers, design a variety of styles, such as Mbt Chapa shoe, MBT Lami Shoe