Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

connecting to online server Expand / Collapse
Author
Message
Posted Monday, March 15, 2010 6:33 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 18, 2010 7:56 AM
Points: 2, Visits: 6
Hi guys,
i just finished a .Net Web application for a client. I've uploaded it to their site. The problem is that the connection string property in the web.config file doesn't seem to work. The current connection string looks like this: "Data Source=Server1.DSNConn1;Database=ServerOne;Trusted_Connection=no;User Id=serverman;Password=*******"

The online server is a SQL Server 7.0. I tried creating a DSN on the Hosting server and replaced it in the web.config file, but it still didn't work. Maybe i should try to use the IP address or server name, but i'm unsure about how to do it.

Pls help. Thanx.
Post #882865
Posted Monday, March 15, 2010 7:03 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Tuesday, May 14, 2013 2:24 AM
Points: 1,871, Visits: 2,692
try using
initial catalog
, instead of
database
:
Data Source=servername;Initial Catalog=dbname;

or try: www.connectionstrings.com


----------------------------------------------
Msg 8134, Level 16, State 1, Line 1
Divide by zero error encountered.
Post #882896
Posted Monday, March 15, 2010 7:16 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:20 AM
Points: 31,437, Visits: 13,752
Do you have an error?

I would suggest you grab a template from ConnectionStrings.com, as noted above, and use that.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #882906
Posted Monday, March 15, 2010 8:27 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 18, 2010 7:56 AM
Points: 2, Visits: 6
Thanx Guys. I was actually at connectionstrings.com before coming here. I wasn't just sure which one to use. Still confused.
Post #882983
Posted Monday, March 15, 2010 8:41 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:20 AM
Points: 31,437, Visits: 13,752
Use this:

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

That's a basic, standard one for .NET connections with a user/pwd. If you can use trusted connection, that's great, but this should work. The DSN stuff can work, but it introduces a potential dependency on the particular machine and other setup.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #882997
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse