title: ASP (Classic) RecordSet value 'disappears' after first access, when MySQL TEXT data value
body: <p>A little while ago, in a peaceful world of happy programmers, ASP classic and MySQL (5.0) used to get along fine. ODBC (3.51) was their friend and data would flow from the heavens (read: database) without any issues.</p>
  
  <p>Then, one day, a dark and mysterious event occurred. And now certain DataTypes within the MySQL Clan refuse to behave.</p>
  
  <p>All of a sudden, TEXT stopped being available in the ASP object more than ONCE. Therefore any pre-test of <em>NOT NULL</em> became the end of the data in the object.</p>
  
  <p>... Seriously. What the. You can see representations here: <a href="http://bugs.mysql.com/bug.php?id=44831" rel="nofollow">http://bugs.mysql.com/bug.php?id=44831</a>  and here: <a href="http://forums.mysql.com/read.php?132,220948,220948" rel="nofollow">http://forums.mysql.com/read.php?132,220948,220948</a></p>
  
  <p><strong>My question is:</strong> Has anyone found out why this has started happening. I have <em>ZERO desire</em> to go back and edit 100's of sites to put the value into a var immediately after the recordset is filled.</p>
  
  <p>Halp me superman!</p>
  
  <p>We've tried upgrading to MySQL 5.6 and ODBC 5.1.sumthin &amp; 5.2.5... but nothing helped. (We did decide that the ODBC version had no impact on the issue)</p>
  
  <p><em>Current production server remains at ODBC 3.51 + MySQL 5.0</em><br>
  <em>Current test server comprises of ODBC 5.2.5 + MySQL 5.6</em></p>
  
  <p><strong>Edit:</strong> Using ADODB Connection<br>
  ie:</p>
  
  <pre><code>dim oC, oRs
  set oC = Server.createObject("ADODB.Connection")
  oC.Open database
  
  set oRs = oC.execute("SELECT 'garble garble garble garble' as `textthing`;")
  if not oRs.eof then
      for x = 0 to 3
          response.write "Output: "
          response.write oRs("textthing") &amp;"&lt;br /&gt;"
      next
  end if
  oRs.close
  set oRs = nothing
  oC.close
  set oC = nothing
  </code></pre>
  
  <p>This results in:<br>
  Output: garble garble garble garble<br>
  Output: <br>
  Output: <br>
  Output: <br></p>
  
  <p>(I'd ask for some latitude here: the above text string -> remember it's coming out as a TEXT or MEDIUMTEXT for the sake of this exercise.)</p>
  
  <p><strong>Edit 2:</strong>
  <em>(As noted in a comment below)</em>
  The working solution we have is this: </p>
  
  <ol>
  <li>Change things that really don't need to be ***TEXT to VARCHAR(BigEnough).</li>
  <li>And edit the ASP for things that need to be ***TEXT to put the value
  straight into a variable.</li>
  </ol>
  
  <p>This is far from being a great solution, however it does force you to consider your data more accurately - which can only be a good thing... right?</p>