MySQL mariadb VC client encountered the problem

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.