title: MySQL and ADO - hopeless?
body: <p>Tearing hair out and googling all weekend. I am frantically converting an ASP site to use MySQL.  Am I correct in thinking that I would be barking up the wrong tree to try to use recordset commands to get data in and out of MySQL via ODBC and should only use MySQL procedures?  If so I face a nightmare, I think as have then to work out how to capture the returned values.</p>
  
  <p>Sorry if this sounds hideously ignorant, but no idea where to turn.</p>
  
  <p>DETAILS:</p>
  
  <pre><code>Set SConn = createobject("ADODB.Connection")
  conn.open = "DRIVER={MySQL ODBC 5.1 Driver};"_
  &amp; "SERVER=" &amp; SQLServer &amp; ";"_ 
  &amp; "DATABASE=" &amp; SQLDbase &amp; ";"_
  &amp; "UID=" &amp; SQLUser &amp; ";PWD=" &amp; SQLPW  &amp; "; OPTION=35;"
  
  SQL = "SELECT tblNodes.SingleSiteChildID "
  SQL = SQL &amp; "FROM tblNodes "
  SQL = SQL &amp; "WHERE (((tblNodes.NodeID)=" &amp; m_lngNodeID &amp; "));"
  
  
  set RS=server.CreateObject("adodb.Recordset")
  RS.CursorType = 1
  RS.LockType = 2
  RS.Open SQL, conn
  
  
   With RS
  If not .Fields("SingleSiteChildID")  &gt;0 or isnull(.Fields("SingleSiteChildID")) then
      If m_lngChildCount&gt;0 then
          .Fields("SingleSiteChildID")=0
              m_lngSingleSiteChildID=0
       Else
              .Fields("SingleSiteChildID")=null
              m_lngSingleSiteChildID=null
       End if
       .UPDATE
  End if
  END WITH
  RS.Close
  Set RS = Nothing
  Set conn = Nothing
  
  End Sub
  </code></pre>