title: ODBC Error in SQLDisconnect following Microsoft Tutorial
body: <p>I am currently trying SQL Server's new Machine Learning Services for Python by following Microsoft's <a href="https://blogs.msdn.microsoft.com/mlserver/2018/07/10/run-r-and-python-remotely-in-sql-server-from-jupyter-notebooks-or-any-ide/" rel="nofollow noreferrer">tutorial</a>. I am on a Win10 x64, SQL Server 2017 x64, using <em>Jyputer Notebook</em> and <em>RevoScalepy</em>. </p>
  
  <p>Connection to the database is not a problem, as verified through <em>pyodbc</em>:</p>
  
  <pre><code>import pyodbc
  
  sql_conn = pyodbc.connect(connection_string)
  query = 'SELECT * from dbo.iris_data'
  df = pd.read_sql(query, sql_conn)
  
  df.head(5)
  </code></pre>
  
  <p><a href="https://blogs.msdn.microsoft.com/mlserver/2018/07/10/run-r-and-python-remotely-in-sql-server-from-jupyter-notebooks-or-any-ide/" rel="nofollow noreferrer">Output from pyodbc</a></p>
  
  <p>However, when trying to running a function on SQL Server through RevoScalePy's <em>rx_exec()</em> I receive the error message:</p>
  
  <pre><code>RuntimeError: revoscalepy function failed.
  ====== username ( process 0 ) has started run at 2019-02-18 09:25:58 W. Europe Standard Time ======
  
  [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'username'.
  
  
  
  [Microsoft][ODBC Driver Manager] Connection not open
  
  
  
  ODBC Error in SQLDisconnect
  
  Could not open data source.
  ImportDataSource function failed. Please see the console output for more information.
  </code></pre>