Solved

Adoconnection Connection String mssql custom port

Posted on 2008-10-24
8
1,590 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

740 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