Jul-04-2020, 05:47 AM
You're asking two different things:
1. Connecting to the database from your program, which will let you perform SQL operations against it and manipulate the data in the program.
2. Connecting to the database from PyCharm, which doesn't have anything to do with the program.
For the former, you'll need to install a 3rd party library (you can search for "Python SQL server driver" or something similar). For the latter, PyCharm should have a plugin to do that. I'm an IntelliJ user (for other languages, but PyCharm is based on it) and I use a plugin called DB Navigator - see if that's available for PyCharm too. You also mentioned you couldn't connect from PyCharm. What did you try and what happened?
1. Connecting to the database from your program, which will let you perform SQL operations against it and manipulate the data in the program.
2. Connecting to the database from PyCharm, which doesn't have anything to do with the program.
For the former, you'll need to install a 3rd party library (you can search for "Python SQL server driver" or something similar). For the latter, PyCharm should have a plugin to do that. I'm an IntelliJ user (for other languages, but PyCharm is based on it) and I use a plugin called DB Navigator - see if that's available for PyCharm too. You also mentioned you couldn't connect from PyCharm. What did you try and what happened?