mysql-connector

Mysql Connector C++ Unbuffered ResultSet C++

好久不见. 提交于 2019-12-25 16:25:39
问题 I have a table that holds large data. I want to fetch all the data and process them one by one. According to the documentation here: https://dev.mysql.com/doc/connector-cpp/en/connector-cpp-examples-results.html The API for fetching result sets is identical for (simple) statements and prepared statements. If your query returns one result set, use sql::Statement::executeQuery() or sql::PreparedStatement::executeQuery() to run your query. Both methods return sql::ResultSet objects. By default,

mysql.connector multiple queries: Error -1: No result set to fetch from

烂漫一生 提交于 2019-12-25 08:57:20
问题 In Python 2.7.3, Wins 10, MySQL remote server 5.6.23, MySQL.connector 2.1.3, If I wanna run these two queries together in Python MySQL.connector: SELECT * FROM A LIMIT 5; SELECT DISTINCT COLUM_A FROM B; I got the following error message using the code below: Error -1: No result set to fetch from. Here is the code: import mysql.connector as MySQL cursor = conn.cursor () sql1 = "SELECT * FROM A LIMIT 5;SELECT DISTINCT COLUM_A FROM B" cursor.execute(sql1,multi=True) row = cursor.fetchall ()

Universal App MySQLConnector Queue execution error

≡放荡痞女 提交于 2019-12-25 06:44:39
问题 I try to Execute a queue to my database on my vserver with PHPAdmin and i get the Exception: Code: static string server = "999.999.999.235"; static string database = "admin_"; static string user = "root"; static string pswd = "secret"; public static void login() { string connectionString = "Server = " + server + ";database = "+ database + ";uid = " + user + ";password = " + pswd + ";" + "SslMode=None;" + "CharSet=utf8;"; using (MySqlConnection connection = new MySqlConnection(connectionString

Universal App MySQLConnector Queue execution error

拜拜、爱过 提交于 2019-12-25 06:42:09
问题 I try to Execute a queue to my database on my vserver with PHPAdmin and i get the Exception: Code: static string server = "999.999.999.235"; static string database = "admin_"; static string user = "root"; static string pswd = "secret"; public static void login() { string connectionString = "Server = " + server + ";database = "+ database + ";uid = " + user + ";password = " + pswd + ";" + "SslMode=None;" + "CharSet=utf8;"; using (MySqlConnection connection = new MySqlConnection(connectionString

Is MySQL Connector C++ cgi program vulnerable to MySQL injection just like php is?

亡梦爱人 提交于 2019-12-25 04:36:11
问题 I am making a cgi program using C++ . It allows users to register their information on the website and also login. I am worried about security . Normally, MySQL is vulnerable to MySQL injection when using php to receive form. I am using the MySQL Connector/C++ API. When using C++ , does the method of MySQL injection work on cgi programs? Is the C++ cgi program still vulnerable to MySQL injection ? I know that cgi programs has their own security problems such as buffer overflow but I am asking

The 'await' operator can only be used within an async method [MySQL connector]

為{幸葍}努か 提交于 2019-12-25 04:08:41
问题 This question is related 2 of my previous questions which have been posted on StackOverflow in last few days. 1st Question which was regarding a MySqlClient EndOfStreamException. 1st Question The answer for the 1st question leads me to Switch libraries from MySQL ADO.NET to MySQL connector. I had some issues with some MySQL keywords since moving from MySQL ADO.NET to MySQL connector. I got the answer to that question as well. 2nd Question Now the program is running without any errors. But

Closed cursor error mysql connector c++ 8.0

情到浓时终转凉″ 提交于 2019-12-25 03:12:49
问题 I'm using mysql connector 8.0 and the below code throws a Closed cursor error when trying to fetch the row. std::string query = "SELECT `id`, `username`, `password`, `gender`, `email`, `group_id`, `state`, `unban_time`, `expiration_time`, `last_login`, `last_ip`, `birth_date`, `character_slots`, `pincode`, `pincode_expiry` FROM `game_account` WHERE username = ?;"; mysqlx::RowResult res = server->get_mysql_session().sql(query).bind(username).execute(); try { mysqlx::Row record = res.fetchOne()

MySQL Connector/C++ crashes with g++8.1.0 and C++17

馋奶兔 提交于 2019-12-24 19:42:40
问题 I just started programming in C++ using Visual Studio 2017 and connected to my database. Everything worked fine so far. Then I wanted to use a c++17 feature and realized I needed to upgrade my compiler. After upgrading my compiler to g++8.1.0 using this blog with these commands (and a lot of trial and error): git clone https://bitbucket.org/sol_prog/raspberry-pi-gcc-binary.git cd raspberry-pi-gcc-binary tar xf gcc-8.1.0.tar.bz2 mv gcc-8.1.0 /usr/bin cd .. rm -r raspberry-pi-gcc-binary rm /usr

Trying to build mysql-connector-cpp on Windows

空扰寡人 提交于 2019-12-24 07:59:09
问题 I want to be able to build mysql-connector/c++ applications in debug mode (VS2k17), and understand the only way I can do that is to first build mysql-connector-cpp from source on my computer (Windows 10/64bit). I tried the following: cmake . -DWITH_SSL=C:\Users\Rawb\source\libraries\OpenSSL-Win64 and it looks to complete successfully ... Install location: C:/Users/Rawb/MySQL/MySQL Connector C++ 8.0 Connector libraries will be installed at: lib -- Configuring done -- Generating done -- Build

MySQL SecureString as connection string

岁酱吖の 提交于 2019-12-24 05:41:19
问题 I've a general question about a SecureString as connection string for MySql-Connector. If i understood it right, SecureStrings are a "safe" way to store strings within my program. Now i've two problems with that: I've to read in the password at installation ( TextBox which is string and therefore unsafe) I've to build a connection string for the MySQL-Connector which is string (unsafe again) example: MySqlConnection con = new MySqlConnection(); MySqlConnectionStringBuilder builder = new