Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2004, 08:31 AM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default connection string for sql server

Hi Guys

Please help... I'm fairly new to asp.net and can't seem to figure out how to deploy my web project to the web server. I keep getting error message "Specified SQL Server not found: (local)\NetSDK" and I'm guessing it's because I need a different value to the server property in the connection string when my database is on the web server rather than on my local machine. Is this correct? And if so, what should the connection string say?

Thanks

 
Old September 16th, 2004, 08:44 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

http://www.connectionstrings.com/

Take a look at the different ways to connect.

Yes, the webpage covers what you should use.

 
Old September 16th, 2004, 09:01 AM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks but now I'm even more confused...

I'm not really sure which one I should be using. Is it the standard security one and what is the difference between the data source and the initial catalog.

Standard Security:
"Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd

 
Old September 16th, 2004, 09:12 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

If I'm not mistaken the Initial Catalog should be the Database Name like Northwind, pubs, etc.

Data Source should be the Server that SQL Server resides.

 
Old September 16th, 2004, 09:15 AM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok cool, but how do you know what the server name is. Is it web address. So say for example, www.mydatabase.com is a database driven web site and the sql server database sits on the root directory of the web server. Would the server name then be mydatabase.com???

 
Old September 16th, 2004, 02:01 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The connection string you have been using should be fine if it's been working all along, you just need to change the server name. Of course, if security is set up differently on the web host's database system then you'll have to adjust accordingly.

If the database is running on the same box as the web application then "localhost" for the server name should work. You need to check with your host provider what name should be used.
 
Old September 16th, 2004, 02:49 PM
Authorized User
 
Join Date: Sep 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm getting a different error now.. "SQL Server does not exist or access denied" but I guess I should open a new topic. I've never used one of these forums before but I have to say that so far so good.

It's been very helpful.
Thanks All








Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server Express Connection String dkaufmann VB Databases Basics 4 November 3rd, 2006 01:48 PM
Sql Server 2000 Connection String ricpue BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 July 5th, 2006 05:26 PM
Problem with SQL SERVER Connection String Non Linear BOOK: Beginning ASP 3.0 3 October 20th, 2005 12:35 AM
sql server 2000 connection string nikotromus Access VBA 6 February 13th, 2005 10:01 PM
SQL Server Connection String Nicky2k Classic ASP Basics 4 January 13th, 2005 05:22 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.