title: ODBC connection error when opening connection from second website PHP file
body: <p>I have an website that is pulling bottling calendar information through and ODBC connection.  The first time I open the connection in my main file it works fine.  However, in that file I have some jquery that posts to another file that also uses the ODBC connection.  However, the ODBC connection always fails in the second file.  </p>
  
  <p>Note, if I put the second ODBC connection at the bottom of the first file it works.  I thought maybe that I needed to close the first connection, but that seems to have no bearing on whether it works or not.</p>
  
  <p>for example, I tried odbc_close();  or odbc_close($conn);</p>
  
  <p>Also, if run the other file separetly (ie open it on it's own in it's own window) the connection opens fine.</p>
  
  <p>Any ideas?</p>
  
  <p><a href="http://hq.terravant.com/calendar/calendar.php" rel="nofollow">http://hq.terravant.com/calendar/calendar.php</a></p>
  
  <pre><code>    $conn = odbcConnect();
      $sql = ("SELECT * FROM Master_Schedule Master_Schedule_0  ");
      $result = odbc_exec($conn, $sql);
  
      $cases = (odbc_result($result, 'Quantity'))/12;
      $productDesc = odbc_result($result, 'ProdDesc');
      $odbcDate = odbc_result($result, 'Date');
      $ProdNo = odbc_result($result, 'ProdNo');
  
  
  
  
      ?&gt;
  
      &lt;table&gt;
          &lt;thead&gt;
              &lt;th&gt;Desc&lt;/th&gt;
              &lt;th&gt;Item&lt;/th&gt;
              &lt;th&gt;Quantity&lt;/th&gt;
              &lt;th&gt;On Hand&lt;/th&gt;
              &lt;th&gt;Variance&lt;/th&gt;
          &lt;/thead&gt;
              &lt;tr&gt; &lt;td&gt;Date&lt;/td&gt;          &lt;td&gt;    &lt;?php echo $odbcDate; ?&gt;     &lt;/td&gt; &lt;td&gt;  &lt;/tr&gt;
              &lt;tr&gt; &lt;td&gt;Product ID&lt;/td&gt;    &lt;td&gt;    &lt;?php echo $ProdNo ?&gt;    &lt;/td&gt; &lt;/tr&gt;
              &lt;tr&gt; &lt;td&gt;Product Desc&lt;/td&gt;  &lt;td&gt;    &lt;?php echo $productDesc ?&gt;   &lt;/td&gt; &lt;td&gt; &lt;?php echo $cases ?&gt; &lt;/td&gt; &lt;/tr&gt;
  
      &lt;/table&gt;
  </code></pre>