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

Ineffective Prepared Delete Statement (no replies)

$
0
0
I'm attempting to execute a prepared delete statement like so:

prep_stmt = conn->prepareStatement("DELETE FROM my_table WHERE my_column = ?");

sql::SQLString test_string = "\'asdf\'";

prep_stmt->setString(1, test_string);

int update_count = prep_stmt->executeUpdate();

There appears to be no runtime errors (at least, no exception is thrown). However, update_count is zero, and investigating the contents of the database after execution reveals that the associated data entry was not removed.

Has anyone seen this before?

Viewing all articles
Browse latest Browse all 527

Trending Articles



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