Solved

SQL Connection String

Posted on 2013-06-25
6
381 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
[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
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
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 
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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

695 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