Connect to a database using Python in Microsoft Visual Studio - visual-studio

I am using Microsoft Visual Studio 2013 Shell (Integrated) with Microsoft Python Tools for Visual Studio installed.
I have connected an existing database by going to Tools -> Connect to a Database.... I can now see my database in server explorer.
How do I access that database from my python application? Should I use pyodbc? Am I already connected to the database?

This is not possible through Server Explorer.
We don't have any Server Explorer integration in PTVS yet
Source: PTVS forum

Related

Is a licensed version of Visual Studio required for SSIS solution?

Is it possible to open a SSIS solution using Microsoft's free tools (Visual Studio Team Explorer and SQL Server Data Tools) or does it require a full installation of Visual Studio?
I am trying to do so with just the free tools and am getting an error saying that "this versino of Visual Studio is unable to open the following projects" then another one saying the solution I have opened is under source control but not currently configured for integrated source control in visual studio.
We have other users who use the full version of Visual Studio 2017 and it works fine so I am wondering if this is just a limitation of the free products offered by Microsoft.
To edit SQL Server 2005 SSIS packages, you need Visual Studio 2005 and installation of Business Intelligence Designer Studio, BIDS. This required a license, developer edition was sufficient, to access the tooling.
SQL Server 2008 & SQL Server 2008 R2 would install into Visual Studio 2008. This too required a SQL Server license as the media only existed on the server media.
SQL Server 2012 would install into both Visual Studio 2010 and Visual Studio 2012. This was delivered in both physical media installations and downloadable tooling which was rebranded to SQL Server Data Tools- BI Edition, now just SQL Server Data Tools and the components were just licensed via click through agreement.
SQL Server 2014 installs into Visual Studio 2013 and was now only available through the download of SSDT.
SQL Server 2016 added a new twist into the mix. It installed into Visual Studio 2015 but it could now create/edit/target SQL Server 2012, 2014 and 2016 packages. This was huge as until this point, as a consultant I would have required 5 different versions of the "same" program on my machine. Now I'd only need 3.
SQL Server 2017 installs SSDT in both Visual Studio 2015 and Visual Studio 2017.
I assume SQL Server 2019 will similarly target VS 2017 and VS 109.
Across all of these versions, if you didn't have Visual Studio installed, the installer would install the Visual Studio shell on your machine so that the project templates would work.
Last I knew, neither Visual Studio Community Edition nor VS Code will work with the SSDT templates so be sure and open the correct product to work with SSIS projects (.dtproj)
The warning/error about "under source control but not currently configured" smells like something is awry with how you have the TFS hook installed but I can't comment on that.
Download and install SSDT 2017 for Visual Studio
You can verify the status of your SSDT installation for Visual Studio by going to the Help, About Microsoft Visual Studio menu and looking for "SQL Server Integration Services." With ... 2017? you can now do a piecemeal install and only pick SQL Server Data Tools (database projects) or SSAS/SSIS/SSRS. Previously, the SSDT-BI install was trio of SS_S and SSDT (no BI) was the database projects.
Previous answer on where SSDT-BI is
You have at lease two options:
Use Visual Studio Community Edition together with SSDT. Still, you have to check its License terms with your Legal department - it might be not legal to use Community Edition in Enterprise.
Use Visual Studio Isolated Shell together with SSDT. More instructions on how to install it. As far as I know, it is legal to use it for debugging.
The VS Isolated Shell is usually installed with SQL Server 2014/16.

Visual Studio 2010 Server Explorer Data Connections

I have installed Visual Studio 2010 and I'm following this LINK but when I reach Step #3 I stuck. How to overcome this problem?. Thanks.
Install Oracle Data Access Components (ODAC) 11.2.0.3 or later from OTN. The ODAC download includes Oracle Developer Tools for Visual Studio and ODP.NET that will be used in this lab.

Error TF31002 When Trying to Connect SSDT 2010 TO VSTS

Trying to connect my Visual Studio Team Services server in SQL Data Tools 2010, but getting the following error, i have correctly installed the Microsoft Visual Studio Team Explorer 2010 - ISO
Visual Studio online currently only works with VS2013 and above. It's not support for SSDT2010. You may need to use SSDT in VS2013 and try again.
SSDT is available in VS 2013, it's integrated into the box so we do
not have a stand alone install. If you install VS 2013, you will see
the Database Projects, SQL Server Object Explorer, and other tools
that were available in VS 2010 & VS 2012. I have verified that the
Database Projects in VS2013 will work with VS Online source control,
however if you are using the online build process, we are not built
into the online build support yet.
Posted by Jill [MSFT] on 1/13/2014 at 2:36 PM
More detail info please refer this link: SSDT with VIsual Studio Online

Not able to modify tables on remote SQL Server 2012 database

I have Visual Studio 2010 installed on my Windows 10 PC. My website is on a shared hosting environment and utilizes a SQL Server 2012 database.
The hosting provider doesn't have web interface to manage database so I connect from the Visual Studio 2010 itself for management purposes.
Right now I am able to connect to the database and run my website locally but when I attempt to open table definition, I get this error:
This server version is not supported. Only servers up to Microsoft SQL Server 2008 are supported
Before upgrading to Windows 10, I was able to edit/add tables from Visual Studio 2010 Server explorer but now limited to read purposes only. This Windows 10 and Visual Studio is completely fresh install with nothing kept or saved from earlier windows version. I don't remember if I installed any SQL Server 2012 tools in earlier windows for managing the database from Server Explorer in Visual Studio.
I have searched a lot and even tried installing SQL Server 2012 Express which failed. Now, I am downloading SQL Server 2012 Management Studio from the same link to see if that will work. It will download in an hour or so but I don't remember downloading it earlier so wanted to ask you what can be done.
All I want is the ability to add/modify tables of SQL Server 2012 database from Server Explorer in Visual Studio 2010. Please tell me how can that be done and which tools are required for this purpose.

Can't to connect Visual Studio 2008 to TFS 2010

I am trying to connect to my TFS 2010 RC server. When I try to connect I get a error message.
Here is a screen shot:
alt text http://xs.to/image-2537_4B8BEAA0.jpg
This is the path I am using to connect: http://tfs2010test:8080/tfs/DefaultCollection
I have Team Explorer 2008 SP 1 installed.
I have read this question: Visual Studio 2008: Can't connect to known good TFS 2010. That is how I got my path that I tried.
I can connect just fine using Visual Studio 2010.
What am I missing?
Have you installed the forward compatibility update from here? Further details can be found here.
Here was my solution to get Visual Studio 2008 Team System to connect to TFS2010: (Beware convoluted).
Install Visual Studio 2008 Team Explorer
Uninstall Office 2007 (because of an incompatibility between Visual Studio 2008 SP1 installer and Office 2007)
Run the Microsoft Install Clean Up utility to remove all references to Office 2007 that did not get removed when uninstalling)
Re-Install Visual Studio 2008 Service Pack 1
Install Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010
Reinstall Office 2007 or go to OpenOffice
Access TFS2010 repository...
When I have added TFS servers before, I could not add the port in the URL. Have you tried this without the port, and allow discovery?
A few things to try:
Have you tried connecting with Team Explorer 2010?
Have you tried creating a new project collection?
On your server, open the TFS admin tool and confirm that you have permissions to use that collection.
Be aware, some options are just not available in Team Explorer 2008.
Let me know if you need help with the security/groups on the server. It was very confusing to me when I first tried to work with it.

Resources