Solved

SQL Connection String

Posted on 2013-06-25
6
378 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
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 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

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.

Question has a verified solution.

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

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

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

17 Experts available now in Live!

Get 1:1 Help Now