Solved

Adoconnection Connection String mssql custom port

Posted on 2008-10-24
8
1,575 Views
Last Modified: 2013-11-23
Hi experts,
I am having trouble finding a good connection string to use for custom mssql tcp/ip ports, not the default one (1433). My current connection string is:

Provider=SQLOLEDB.1;Password='+sedit2.Text+';Persist Security Info=True;User ID='+sedit1.Text+';Initial Catalog=GAMEDB;Data Source='+scombobox1.Text

Thanks
0
Comment
Question by:cypherbad
  • 4
  • 3
8 Comments
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 250 total points
ID: 22796478
servername\insteancename,portnumber

So if it's a default isntance.

servername,1234
0
 
LVL 1

Author Comment

by:cypherbad
ID: 22796498
I didn`t quite get it where to place the comma so if you can insert it in my connection string posted would be great.

Many Thanks,
Cypher
0
 
LVL 28

Assisted Solution

by:2266180
2266180 earned 250 total points
ID: 22796506
this site has saved me a bunch of times when I was in this kind of situation: http://www.connectionstrings.com/

what you need to change is:

Provider=SQLOLEDB.1;Password='+sedit2.Text+';Persist Security Info=True;User ID='+sedit1.Text+';Initial Catalog=GAMEDB;Data Source='+scombobox1.Text+','+portEdit.text
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 28

Expert Comment

by:2266180
ID: 22796517
2 minutes too late -_-
0
 
LVL 1

Author Comment

by:cypherbad
ID: 22796519
Thanks i got it know.
0
 
LVL 1

Author Closing Comment

by:cypherbad
ID: 31509663
Thanks ciuly for the example, but since BrandonGalderisi told me the same thing but harder to understand i give to both of you half.
0
 
LVL 1

Author Comment

by:cypherbad
ID: 22796551
Congrats on your genius rank, i kinda know u from a romanian forum... :P
0
 
LVL 28

Expert Comment

by:2266180
ID: 22796571
thanks :)

tell me your username so I can ban you :drac:
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now