Quantcast
Channel: MySQL Forums - Connector/C++
Viewing all articles
Browse latest Browse all 527

How to escape a string? (3 replies)

$
0
0
Connector/C++ 8.0.25 (Legacy JDBC API)

How do I escape a string without using a PreparedStatement and setString(index, value)?

All the other mysql connectors seem to have a 'mysql_real_escape_string' type function. I can not seem to find anything similar with Connector/C++.

The issue with using a PreparedStatement and setString() is our code currently can issue one insert statement with multiple insert rows. Inserting each row one insert at a time will slow down our processing.

Note: I'm in the middle of migrating our code from Connector/C & MySQL++ to Connector/C++. We are upgrading to a new server with MySQL 8.0. And as far as I have found, the Windows version of Connector/C only goes up to 6.1.11. At least via the MySQL installer and the MySQL download page. And Connector/C 6.1.11 can not authenticate against a MySQL 8.0 db without enabling legacy authentication. And we are trying to avoid that.

Viewing all articles
Browse latest Browse all 527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>