Connecting from Python to SQL Server
<p>I'd like to connect from IPython notebook to a SQL-Server database via integrated security. </p>

<p>Is this possible? I'm guessing yes it is.</p>

<p>How do I format the connection string in the following?</p>

<pre><code>import pandas as pd
import pandas.io.sql as psql
sql = "SELECT * FROM WHdb.dbo.vw_smallTable"
cnx = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=WHdb;Data Source=OurServerName"
data = psql.read_sql(sql, cnx)
</code></pre>

<p>This just gives an error.
Am I going about the <code>cnx</code> incorrectly?</p>