restructure connection string for Azure

In order to open a connection on my VB6 app, I use the following info:

Set conn = New ADODB.Connection
Set rec = New ADODB.Recordset


conn.Open "Provider=sqloledb;Data Source=" & ConnectionIP & ",1433;Network Library=DBMSSOCN;Initial Catalog= xxxxxxxx; User ID=xx;Password=xxxx"

However, if I was going to use Microsoft Azure SQL database, I will need to change this connection string.  They provide  ADO.NET, JDBC, ODBC and PHP connection strings.  None of those are similar to what I'm using now, so what changes would I have to make in order to make this connection work?  I'm guessing that ODBC would be the choice which looks like this:

Driver={ODBC Driver 13 for SQL Server};Server=tcp:xxxxxxx,1433;Database=xxxxx;Uid=xxxxxx;Pwd={your_password_here};Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;


How would I structure this in VB6 to connect?
al4629740Asked:
Who is Participating?

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

x
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.

Pawan KumarDatabase ExpertCommented:
For any connection string related issues please refer -

https://www.connectionstrings.com/
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
Do you have access to the SQL Azure subscription where the database is? If so you can get the connection string from there and it even allows you to copy it so you can paste it in your application:
SQLAzure_ConnectionString.PNG
But basically is something like this:
Server=tcp:sqlazureservername.database.windows.net,1433;Initial Catalog=SQLAzureDBname;Persist Security Info=False;User ID={your_username};Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
0

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
al4629740Author Commented:
What changes here?

Set conn = New ADODB.Connection
Set rec = New ADODB.Recordset
0
Vitor MontalvãoMSSQL Senior EngineerCommented:
Nothing. What changes is the line where you set the connection string.
0
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
SQL

From novice to tech pro — start learning today.