[Python] ConnectionURI to connect to SQL Server in Python

Discussão em 'Python' iniciado por Stack, Junho 27, 2025.

  1. Stack

    Stack Membro Participativo

    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.

    Im not sure exactly how that string is supposed to look like.

    I'v tried this:

    "mssql://COMPUTERNAME\SQLEXPRESS/DATABASENAME"


    But getting the following error:

    ImportError: Cannot find an MSSQL driver, tried adodb,pymssql


    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.

    Help will be very appreciated.

    Continue reading...

Compartilhe esta Página