why does this output hex rather than a sentence? connector/c++ <p>I was expecting to see a short english sentence as output but i see hex value of it instread. I cannot find any information on this getblob function but i hear its what should be used for varchar columns. Before i used getString and it crashes the app, its funny though becuase it crashes after it successfully prints the sentence sometimes. However i cant have it crashing so i need to make it work with getblob, it returns an std::istream which i no nothing about. I experimented with converting istream to string but my lack of understanding of what an isteam is did not get me far.</p> <pre><code>#include &lt;iostream&gt; #include &lt;sstream&gt; #include &lt;memory&gt; #include &lt;string&gt; #include &lt;stdexcept&gt; #include "cppconn\driver.h" #include "cppconn\connection.h" #include "cppconn\statement.h" #include "cppconn\prepared_statement.h" #include "cppconn\resultset.h" #include "cppconn\metadata.h" #include "cppconn\resultset_metadata.h" #include "cppconn\exception.h" #include "cppconn\warning.h" #include "cppconn\datatype.h" #include "cppconn\parameter_metadata.h" #include "mysql_connection.h" #include "mysql_driver.h" using namespace std; int main() { sql::mysql::MySQL_Driver *driver; sql::Connection *con; sql::Statement *stmt; // ... driver = sql::mysql::get_mysql_driver_instance(); cout&lt;&lt;"Connecting to database...\n"; con = driver-&gt;connect("tcp://xx.xxx.xxx.xxx:3306", "xxxxx", "xxxxxx"); sql::ResultSet *res; // ... stmt = con-&gt;createStatement(); // ... con-&gt;setSchema("mrhowtos_main"); res = stmt-&gt;executeQuery("SELECT english FROM `eng` WHERE `ID` = 16;"); while (res-&gt;next()) { istream *stream = res-&gt;getBlob(1); string s; getline(*stream, s); //crashes here - access violation cout &lt;&lt; s &lt;&lt; endl; } cout&lt;&lt;"done\n"; delete res; delete stmt; delete con; system("PAUSE"); return 0; } </code></pre> <p>UPDATE: crashes on getline</p> <p>value of stream after getblob:</p> <ul> <li>stream 0x005f3e88 {_Chcount=26806164129143632 } std::basic_istream > *</li> </ul>