Solved

SQL Connection String

Posted on 2013-06-25
6
375 Views
Last Modified: 2013-06-25
Hi Experts I have have a MS SQL Server running on one of my home network, however i want to put an ASP.Net website on the web and connect to the database however i cant get the connection string to work and i have both ports 1433 and 1521 open and forward to the relevent machine.

my Computer Name is SQLServer-PC with Windows Authentication and would be grateful if you could give me some help.

thanks

Simon
0
Comment
Question by:SimonPrice33
6 Comments
 
LVL 16

Expert Comment

by:Surendra Nath
ID: 39275607
it is very difficult to suggest what is going over there, without actually seeing the connection string itself..

At times like this I visit the below website and validate my connection string...
http://www.connectionstrings.com/

it has connection strings for all databases and all sorts of drivers... this might be of some help..

if it does not then, please post the connection string and also the error that you are getting.
0
 

Author Comment

by:SimonPrice33
ID: 39275705
ive tried this site before but it didnt work

<add name="ExtDatabase" connectionString="Data Source=tcp:xx.xx.xx.xxx;Database=WeddingList;User Id=SQLServer-PC\Simon;Password=xxxxxx;" providerName="System.Data.SqlClient" />

the internal connection works but it doesnt need to go through my router and be port forwarded
0
 

Author Comment

by:SimonPrice33
ID: 39275765
the closest on the site that would match what im after is

Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;
User ID=myUsername;Password=myPassword;

but its not getting through
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 13

Accepted Solution

by:
haloexpertsexchange earned 250 total points
ID: 39275779
The first one pretty much matches what our site is using.
  <add name="xxxxxx" connectionString="Data Source=xxxxxx;Initial Catalog=xxxxx;User ID=xxxxx;Password=xxxxx;Connection Timeout=60;Max Pool Size=500;"
   providerName="System.Data.SqlClient" />
0
 
LVL 18

Assisted Solution

by:Jerry Miller
Jerry Miller earned 250 total points
ID: 39275784
Here is one that I use that works.

<add name="ConnectionString_dev" connectionString="Data Source=serverName;Initial Catalog=DatabaseName;Persist Security Info=True;User ID=web_ID;Password=webPassword;Connection timeout=60" providerName="System.Data.SqlClient"/>

Make sure that you can connect through SQL Management using the same user name and password.
0
 

Author Closing Comment

by:SimonPrice33
ID: 39275852
Thank you guys... it was a combination of the two plus another bit that worked...

plus i went for SQL Server Authentication too

 <add name="IntDatabase" connectionString="Data Source=IPADDRESS;Initial Catalog=WeddingList;Persist Security Info=True;User ID=sa;Password=xxxxxxxx" providerName="System.Data.SqlClient" />
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

757 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

21 Experts available now in Live!

Get 1:1 Help Now