can't connect to sql server in visual studio 2015

I'm migrating from a VBA/EXCEL app that connects to SQL Server and runs reports, to SSIS.  I use Visual Studio 2015, and connecting to Sql Server 2012.

I work at a large corporation that is pretty locked down.  I have been able to use an ADODB (2.8) connection using windows authentication.  

It is weird because the connection was working fine, and now it isn't.  I do need to move from windows authentication to SQL Server... I did that with the connection string (many variations attempted) but can't get it to work on my environment (VDI), but a co-worker can get it to work.

This is a lot of background, but I'm looking for a solution, because I can't do anything until I get a connection.

I'm wondering if I can use the data connection in Server Explorer, which does work fine.  I don't know if or how to make the connection in code to an ado object using the data connection in server explorer.  My attempt is in the last line of code below with DirectCast.

Below is my code, with all the attempts remmed out.  I was trying to open the connection, but then tried the direcast using sqlconnection instead.  I don't know if that will work, but I can't move forward because it says "dts" isn't declared.  

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Threading.Tasks
Imports System.Windows.Forms
Imports System.Data.SqlClient
Imports System.Configuration
Imports Microsoft.Office.Interop.Excel
Public Class frmRunReports

    Public Sub MainRunReports()
        Dim sConnString As String

        'Dim oConn As New ADODB.Connection
        Dim oConn As SqlClient.SqlConnection

        '******** OPEN DB CONNECTION
        'sConnString = "Provider = SQLOLEDB;Data, 5544;Initial Catalog=Capsmis_Prod;Integrated Security=SSPI"
        'sConnString = ",5544;Integrated Security=false;User Id=xxxxxx;Password=xxxxxxx;Database=CAPSMIS_Dev1"
        'sConnString = "Provider=SQLNCLI11;,5544;Database=CAPSMIS_Dev1;Uid=xxxx;Pwd=xxxxxx;"
        'sConnString = "Persist Security Info=False;User ID=xxxxxxx;Password=xxxxxxx;Initial Catalog=CAPSMIS_Dev1;,5544;"
        'sConnString = "Data Source=', 5544';Initial Catalog=CAPSMIS_DEV1;Persist Security Info=True;User ID=xxxx;Password=xxxxxx"
        'Data Source=", 5544";Initial Catalog=CAPSMIS_DEV1;Persist Security Info=True;User ID=xxxxxxx;Password=***********
        oConn = DirectCast(Dts.Connections("capsmis_prod").AcquireConnection(Dts.Transaction), SqlClient.SqlConnection)

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pushpakumara MahagamageVPCommented:
check following Article, there is so many connection types,

ADO.Net connection string is as follows

Server=yourserver,your-TCP-port;Initial Catalog=yourDB-Name;Persist Security Info=False;User ID=your_username;Password=your_password;Connection Timeout=30;

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dougfosterNYCAuthor Commented:
I did see that webpage... and have tried all the combinations of connection strings, I think.

So there isn't a way to connect to the data connection in the Server Explorer?  That did connect successfully.

and I'm not sure why the DTS object isn't declared.  am I missing an import statement (at the top of the code in the original post)?
dougfosterNYCAuthor Commented:
Thanks, i forgot to close this question.
Pushpakumara MahagamageVPCommented:
You are welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.