Category : sql

I am trying to read an big string from an sql database. The sql type is SQL_VARCHAR. Which type I have to choose in c++ to store the response? My string is an JSON Object, which I want to parse later on. But this is step two. Unfortunetely I am not even able to store ..

Read more

Hi i become a Rutine Error "string too long" for the following query wrk.exec(""); it does not matter if the query contains something like "SELECT * FROM Jens" or not. pqxx::connection con("host=localhost port=5434 dbname=TEST!2 user=postgres password=12345678"); pqxx::work wrk( con ); try { wrk.exec(""); } catch (std::exception const &e) { std::cerr << "Error: " << e.what() ..

Read more

I have the following sql procedure: USE starwars; DROP PROCEDURE IF EXISTS p1; DELIMITER // CREATE PROCEDURE p1() BEGIN DECLARE done INT DEFAULT FALSE; DECLARE x VARCHAR(64); DECLARE cur CURSOR FOR SELECT COLUMN_NAME FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ‘starwars’; DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE; OPEN cur; read_loop: LOOP FETCH cur ..

Read more

I made month calendar. How to make "date" variable from date from calendar and how to instert this date to mysql database? MySqlCommand^ zapytanie = gcnew MySqlCommand("INSTERT INTO lotnisko.loty (data) VALUES (‘" +data +"’) ", laczbaze); when I did that, it didn’t work: private: System::Void kalendarz_DateChanged(System::Object^ sender, System::Windows::Forms::DateRangeEventArgs^ e) { data = kalendarz->SelectionStart; } I ..

Read more

I get the following error when I type mysql into the command prompt (I’m using Windows 10): ‘mysql’ is not recognized as an internal or external command, operable program or batch file. I’m pretty sure the my PATH environment variable is set correctly. Here’s a screenshot: I’m pretty sure that mysql is installed properly because ..

Read more

I’m using SQLAPI++ to build a backend application which needs to access a database (SQL Server 2014). When I try to read a string (nvarchar(50)) from a result set that contains non-ascii characters (specifically persian characters), the cmd.Field("MyField").asString().GetxxxChars() methods all return question marks (?) instead of those characters. What should I do? I have also ..

Read more