locked
GoDaddy Database Connect example? RRS feed

  • Question

  • User-55569844 posted

    Does anyone have a nice CLEAR (perhaps just a default.aspx and web.config) showing how to connect to a SQL Server 2000 database on GoDaddy's shared hosting? I have the whsql.... stuff and userID and password but, so far, I've not successfully actually reached the database from a default.aspx form -- even the simplest of grids that I tested out on the local system.

    I've added a couple of tables to the standard ASP.NET database (on the theory -- is that true? -- that other things can co-exist there) and just want to toss the entries on the hosted database into the same grid.  Here are the two ConnectionStrings:

     <!--<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>-->

    <add name="ConnectionString" connectionString="Server=whsql-v16.prod.mesa1.secureserver.net Initial Catalog=DB_138***; User Id=*****; Password=*******; Trusted_Connection=False;" providerName="System.Data.SqlClient"/>

    where ***s have obliterated real things known to connect properly.

    There is some confusion betwen "Initial Catalog=DB..." and "DATABASE=DB..." and GoDaddy support has unfortunately gone into a mode of (and here I quote!) "we are unable to assist with scripting support or debugging."

    many mahalos (thanks) in advance from the garden isle of Kauai ... :)  KevInKauai

    Friday, May 25, 2007 11:30 PM

Answers

  • User-1705717250 posted

    Well I would use

    SqlConnection (.NET)
    Data Source=whsql-v16.prod.mesa1.secureserver.net; Initial Catalog=DB_138988; User ID=trialdb; Password='your password';

    Seems funny that the email and support article are different.

    I take it you have upsized your sql express db to godaddy's sql server. You will need to put both your application database and the aspnet membership into one datbase on the godaddy's server. Then you can use the same connection string in the web.config for data & membership.

    Go luck

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 26, 2007 12:38 PM

All replies

  • User-1705717250 posted

    Take a look at http://help.godaddy.com/article.php?article_id=689&topic_id=&&

     Seems that godaddy want you to use Database=DB_xxx; 

    Hope it helps

    Saturday, May 26, 2007 4:48 AM
  • User-55569844 posted

     A GoDaddy support rep just sent me an email which supposedly "specifies" how to connect to the database hosted on their SQL.

    ODBC
    Driver={SQL Server}; Server=whsql-v16.prod.mesa1.secureserver.net; Database=DB_138988; Uid=trialdb; Pwd='your password';

    OLE DB, OleDbConnection (.NET)
    Provider=sqloledb; Data Source=whsql-v16.prod.mesa1.secureserver.net; Initial Catalog=DB_138988; User ID=trialdb; Password='your password';

    SqlConnection (.NET)
    Data Source=whsql-v16.prod.mesa1.secureserver.net; Initial Catalog=DB_138988; User ID=trialdb; Password='your password';

    If my Local (testing) connection string from my GridView is the following:
    connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"

    WHICH approach would I use?

     

    STILL CONFUSED! :)  KevInKauai 

     

     

    Saturday, May 26, 2007 6:14 AM
  • User-1705717250 posted

    Well I would use

    SqlConnection (.NET)
    Data Source=whsql-v16.prod.mesa1.secureserver.net; Initial Catalog=DB_138988; User ID=trialdb; Password='your password';

    Seems funny that the email and support article are different.

    I take it you have upsized your sql express db to godaddy's sql server. You will need to put both your application database and the aspnet membership into one datbase on the godaddy's server. Then you can use the same connection string in the web.config for data & membership.

    Go luck

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, May 26, 2007 12:38 PM
  • User1369288758 posted

    how do i get the Initial Catalog? I gave it as Initial Catalog=isn*** ,but there a connection error. Please guide.

    Sunday, May 19, 2013 5:46 PM