ConnectionURI MSSQL Python
<p>I'm coding a little something in Python. I need to get some data from a MicrosoftSQL database and convert it to a JSONObject. And i think i have some problems with the ConnectionForURI. I'm using simplejson and sqlobject libraries.</p>

<p>Im not sure exactly how that string is supposed to look like. </p>

<p>I'v tried this:</p>

<pre><code>"mssql://COMPUTERNAME\SQLEXPRESS/DATABASENAME"
</code></pre>

<p>But getting the following error:</p>

<pre><code>ImportError: Cannot find an MSSQL driver, tried adodb,pymssql
</code></pre>

<p>Is that becuase my connectionURI is wrong? I'v tried alot different with usernames and stuff, but i didn't need that when using pypyodbc.</p>

<p>Help will be very appreciated.</p>

<pre><code>##1st option
cnxn = pypyodbc.connect("dsn=mydsn;Trusted_Connection=Yes")
##mydsn=DSN Name

##2nd option
ConnectionDtl='Driver={SQL Server};Server=WIN7-297;Database=AdventureWorks2014;trusted_connection=yes'
connection = pypyodbc.connect(ConnectionDtl)
</code></pre>

python sql-server database-connection simplejson sqlobject