<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Connect to MSSQL Server with Python using SQLAlChemy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/connect-to-mssql-server-with-python-using/m-p/1303189#M68028</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Seems like your problem is related to &lt;FONT face="courier new,courier"&gt;create_engine&lt;/FONT&gt;. pyodbc is used as the default DBAPI. You may also use pymssql. You can learn more about this here:&amp;nbsp;&lt;A href="https://docs.sqlalchemy.org/en/20/core/engines.html" target="_blank"&gt;https://docs.sqlalchemy.org/en/20/core/engines.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I would explain to your team that's just how things work. You need some kind of DBAPI and here you have two options.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2023 22:09:34 GMT</pubDate>
    <dc:creator>EarlMedina</dc:creator>
    <dc:date>2023-06-26T22:09:34Z</dc:date>
    <item>
      <title>Connect to MSSQL Server with Python using SQLAlChemy</title>
      <link>https://community.esri.com/t5/python-questions/connect-to-mssql-server-with-python-using/m-p/1301999#M68011</link>
      <description>&lt;P&gt;I have installed SQLAlchemy 2.0.16 on my machine. I am trying to connect to sql server database using below code:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;from&lt;/SPAN&gt; sqlalchemy &lt;SPAN class=""&gt;import&lt;/SPAN&gt; text , create_engine
Server = &lt;SPAN class=""&gt;''&lt;/SPAN&gt;
Database = &lt;SPAN class=""&gt;''&lt;/SPAN&gt;
Driver = &lt;SPAN class=""&gt;''&lt;/SPAN&gt;
Database_Con = &lt;SPAN class=""&gt;f'mssql://@&lt;SPAN class=""&gt;{Server}&lt;/SPAN&gt;/&lt;SPAN class=""&gt;{Database}&lt;/SPAN&gt;?driver=&lt;SPAN class=""&gt;{Driver}&lt;/SPAN&gt;'&lt;/SPAN&gt;
&lt;SPAN class=""&gt;#Create the engine to connect to the database&lt;/SPAN&gt;
engine=create_engine(Database_Con)
con = engine.connect()&lt;/PRE&gt;&lt;P&gt;Throws ModuleNotFoundError: No module named 'pyodbc'&lt;/P&gt;&lt;P&gt;If I do a pip install pyodc it works. But my team doesnt want me to install pyodc and want to try to connect to SQLengine. Please let me know any alternatives. Thank You&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 14:15:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/connect-to-mssql-server-with-python-using/m-p/1301999#M68011</guid>
      <dc:creator>ChallagundlaSindhuraITS</dc:creator>
      <dc:date>2023-06-22T14:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Connect to MSSQL Server with Python using SQLAlChemy</title>
      <link>https://community.esri.com/t5/python-questions/connect-to-mssql-server-with-python-using/m-p/1303189#M68028</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Seems like your problem is related to &lt;FONT face="courier new,courier"&gt;create_engine&lt;/FONT&gt;. pyodbc is used as the default DBAPI. You may also use pymssql. You can learn more about this here:&amp;nbsp;&lt;A href="https://docs.sqlalchemy.org/en/20/core/engines.html" target="_blank"&gt;https://docs.sqlalchemy.org/en/20/core/engines.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I would explain to your team that's just how things work. You need some kind of DBAPI and here you have two options.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 22:09:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/connect-to-mssql-server-with-python-using/m-p/1303189#M68028</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-06-26T22:09:34Z</dc:date>
    </item>
  </channel>
</rss>

