• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 675
  • Last Modified:

Trying to connect to an SQL db using ASP.Net on godaddy

I am using Visual Studio 2008 and trying to develop an ASP.net applicaiton that connects to an MS SQL database.  The site and database are hosted at godaddy.com.  Since godaddy does not accept remote connections to the database I am having trouble configuring a connection that works.  Can anybody walk me through the process of connecting.  From my past experience with Coldfusion I could setup a testing server locally and using a DSN I could test my app locally and get it would work using the DSN once uploaded.  I have created a DSN on godaddy for this database but do not know how to use it in ASP.NET.  Thanks
0
nelsonhale
Asked:
nelsonhale
  • 2
  • 2
1 Solution
 
BrandonGalderisiCommented:
This will show you how to build your connection string.
http://www.connectionstrings.com/?carrier=sqlserver2005

Then all you do is have two different connection strings in your app.  A "LOCAL" one for testing, and your hosted one for when you deploy.
0
 
nelsonhaleAuthor Commented:
Thanks for the response.  I can get the connection string from Godaddy:  Data Source=p3swhsql-v20.shr.phx3.secureserver.net; Initial Catalog=BuildItWithLogs; User ID=BuildItWithLogs; Password='your password';

I have a simple data grid that I am trying to fill.  In visual studio I can create Data Connection to hit my local database ( a simple access db).  I'm not sure using the data connection wizard how I create a separate connection using connection string.  If I choose SQL server as the Data Source it doesn't let me save this connection because it can not actually be verified, I'm assuming.  Again because godaddy is not allowing remote connections.  I've also tried to setup using ODBC but run into the same problem.  Thanks for your help.
0
 
BrandonGalderisiCommented:
That connection string is stored in your app config file.  Just add the second one in (commented out) and swap them on deploy.  Or, have a different build set that builds with a different option.
0
 
nelsonhaleAuthor Commented:
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now