Writing a database client using VS2017
Specific settings can be found in the following sections
Https://dev.mysql.com/doc/connector-cpp/en/connector-cpp-apps-windows-visual-studio.html
Http://www.cnblogs.com/flipped/p/6810216.html
Encounter some problems
Illegal memory access occurs whenever a string operation involving SQL is involved
After a day of troubleshooting, it was associated with Lib.
Be aware that the imported MySQL Lib is 32-bit or 64-bit and can only be release version more puzzled is how to release how to debug it? Just by printing?
Examples of client code usage are as follows
Pstmt = Con->preparestatement ( "INSERT into Test (ID) VALUES (?) "
< Span class= "token punctuation" >for int i Span class= "token operator" >= 1; I <= 10++< Span class= "token punctuation" >) {
< Span class= "token punctuation" >< Span class= "token operator" > Pstmt->setint (1"
< Span class= "token number" > < Span class= "token punctuation" > < Span class= "token punctuation" > Pstmt->executeupdate ("
< Span class= "token punctuation" >
->setint pstmt->setstring .... You need a small package.
< Span class= "token punctuation" > < Span class= "token punctuation" > < Span class= "token operator" > todo add a simple Type identification wrapper code
MySQL mariadb VC client encountered the problem