Solved

Adoconnection Connection String mssql custom port

Posted on 2008-10-24
8
1,573 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:ciuly
ciuly 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
 
LVL 28

Expert Comment

by:ciuly
ID: 22796517
2 minutes too late -_-
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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:ciuly
ID: 22796571
thanks :)

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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

758 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

20 Experts available now in Live!

Get 1:1 Help Now