Wednesday, March 7, 2012

GoDaddy / MySQL / SQL Server

I don't know if this is unique to GoDaddy: I found the program for working with a MySQL database very intuitive (to the point of compliments). Today I started work with ASP.NET and SQL, and when I went to work with SQL Server (on GoDaddy), it wasn't intuitive, and there was almost nothing on which to click. By chance might there be a tutorial that would help a person who needs to work with SQL Server on a provider like GoDaddy?

This may help...

http://forums.asp.net/thread/1456464.aspx

|||

I'm going through it, and I come to a point where I think it asks me to connect to the server (IP and PORT). I believe GoDaddy doesn't allow this (if someone reads this and I've misinterpreted it, please hollar--I know there is something that GoDaddy forbids regarding connected outside of their system).

If the above is true, does that make it so that the above process won't work (that's what I'm thinking right now.

However, thank you for the above link, because it gave me an idea. GoDaddy has it so that you can run queries. If I had a database with 250 entries and I didn't want to retype them all, I might be able to construct the database through the query box. Thanks! (going to test that out now.)

|||

The thread was started as a request by a newbie for help for someone who is on GoDaddy and they got to the SQL Server, and then they were stuck (what do I do next?) Over time I figured it out, and if you came to this post because you are "stuck", feel free to continue the thread with another question. I'm putting some basic things you want to know below:

Assuming that you've created a database under SQL Server and given it name and a password, and that you clicked on "Open Manager" in the row with the name of your database are now on a page with a name likehttps://mssqladmin.secureserver.net:

You see Quick Help with a bunch of words and icons (this doesn't help you though, those are not links, those are things you will see later).

On the left, you see Connection and Preferences, click Connection. Click the new link 'connection' the comes up underneath.

Put in your user name and password and click Connect.

There should be a new choice between Connection and Preferences on the left and it may have a name like whsql-v03.

Click that. You should then see Databases and Tools, and both will be helpful. Click Tools and then Query Analyser. This box is where you can type a query line that creates a table for your database:

CREATE TABLE mydictionary (word nvarchar(50), definition text)

and if it creates successfully, you will see "The command(s) completed successfully." appear underneath. You now have a table with two fields, word and definition.

Go back to the menu on the left and click Databases. something like DB_123456 comes up and click on that. Underneath you have Tables, Views, Stored Procedures. Click Tables. A list of tables comes up, many that you didn't make, but look for yours at the bottom. Don't click it just yet--instead, mouse over to all the icons on the right in the same row, and click the first one, content.

Look for the word Actions and then click that yellow star/asterisk. The next window gives you text boxes to put in your first entry. Fill them and click Insert.

At this point you have a database. It doesn't have things that are important, like a primary key with auto_increment, but the database will work for the purpose of confirming your first success.

|||

My advice to Godaddy users is to start with getting a simple page working that writes to one table in your new database. That will give you a web.config file with a working database connection and you can move on from there.

The web.config database connection seems a particular issue for newbies, I've put together a page with tips based around going live on GoDaddy with SQL Server, when you've got SQL Express on your local PC.

http://www.salmontraining.com/SqlExpressZone/Articles/why_the_development_config_file_wont_work_on_live_shared_hosting_with_sql_server.aspx

No comments:

Post a Comment