vc2010 mysql5.7_VC2010利用MySQL++访问mysql. 及连接池示例
參加這個哥們的博客
http://www.voidcn.com/article/p-mfnvxzca-cd.html 我的一個測試?yán)?#xff0c;用到了blob; #include #include #include #include #include using namespace mysqlpp; using namespace std; sql_create_3(sorttest,1,3,sql_int_unsigned,id,sql_char,name,sql_blob,bin) struct node { unsigned int a; unsigned int b; node(){a=0;b=0;} }; int main() { try { Connection con(true); con.connect("mysqltest","localhost","xxx","xxxxxx",3306); ?//up to u cout< v; query << "select * from sorttest"; ?//your table name query.storein(v); for (vector::iterator it=v.begin(); it!=v.end(); ++it) { cout<id<name<bin.data(); rd.a = (*(unsigned int *)&p[0]); rd.b = (*(unsigned int *)&p[4]); cout<
總結(jié)
以上是生活随笔為你收集整理的vc2010 mysql5.7_VC2010利用MySQL++访问mysql. 及连接池示例的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: window服务器cpu过高的排查_线上
- 下一篇: springboot的jsp应该放在哪_