title: SQL Server adds b'...' to the jwt tokens I store
body: <p>I am storing JWT tokens used in authentication for a web service in a SQL Server database. I've declared the column that holds the tokens as type nvarchar(max) and am passing them into the database as simple strings. When I insert the token, SQL Server adds b'...' to it. For example, say I add the token ABC123, then it stores b'ABC123'.</p>
  
  <p>This is causing problems down the line as when I compare the token stored in the database to the token being passed through the api, the comparison fails due to the additional characters (the database seems to have literally added a lower case b and two single quotes to the stored string).</p>
  
  <p>I know I can just strip the b and quotes off my string once I pull it from the database, but I'd like to know why SQL Server is doing this and how I can prevent it from doing it.</p>
  
  <p>Anyway, any insight would be much appreciated.</p>
  
  <p>EDIT: is it possible pyodbc is doing this? Here is my code to insert:</p>
  
  <pre><code>cnxn = pyodbc.connect("&lt;connection string&gt;")
  crsr = cnxn.cursor()
  crsr.execute("insert into jwt values (?,?)", [userId, str(auth_token)])
  </code></pre>
  
  <p>Perhaps it is confused between Python 3 and Python 2 strings? (I'm using Python 3.6.) In that case, how would I fix it?</p>