Friday, February 3, 2012

Namespace in .NET

Namespace - in order to connect to a database in .NET, you have to reference the Namespace that you will be using in your .aspx page. What is a Namespace?

"Put simply, a namespace is just a grouping of related classes. It's a method of putting classes inside a container so that they can be clearly distinguished from other classes with the same name." - read more here.

The Access namespace was easy - instructions for that are everywhere. Here is the crucial line, at the top of the code on line 2: <%@ Import Namespace="System.Data.OleDb" %> (see http://kevlaur.net/AccessingAccessData.aspx for a code listing).

The MySQL Namespace took some searching. I had a false start with an open source namespace written by a programmer, then I found a better solution on the MySQL website. You download the .dll and place it in the /bin folder, then it is referenced this way:

<%@ Import Namespace="MySql.Data" %>
<%@ Import Namespace="MySql.Data.MySqlClient" %>

Reference: Build Your Own ASP.NET 4 Website Using C# and VB

To begin creating my project website, I downloaded Microsoft Visual Studio Express per the instructions in Build Your Own ASP.NET 4 Website Using C# and VB. I worked through the book and the lovely Dorknozzle Intranet project, up to the point where it explained db connections. I took a detour and found instructions elsewhere, as it uses Microsoft SQL Server and I am already happily using MySQL and Access.

Project Site hosted at GoDaddy

My project website is located at www.kevlaur.net. This site is hosted on GoDaddy and it is the Windows Deluxe 4GH Windows Package for $5.94 per month. GoDaddy offers free web hosting with the purchase of a domain name, but there is an ad at the top. However, you cannot connect remotely to your MySQL database if you have free hosting, so I got the paid plan.

GoDaddy actually provides you with connection strings for your MySQL database, although you have to do some digging to find it. Their support has proved very good and they have an exceptional online help system.

Power Point 2003 will not open in Power Point 2007

Power Point Presentation FAIL! How embarrassing! I even opened on my Mac in Open Office before class, so who would have thought that a Power Point 2003 file would not open in Power Point 2010? There is a compatibility pack download for that and you can get it here.

Wednesday, February 1, 2012

Semester Project

I am thinking of a repository of web technology information and links, as my semester project. That will give me the opportunity to create a data-driven website and make use of the widest variety of skills covered in the course.

My current working space is www.kevlaur.net.

Saturday, January 21, 2012

HTML5 and CSS3 Book

I am working through HTML5 and CSS3: Visual Quick Start Guide. The companion site is here, and the book is available on Safari books.

Thursday, January 19, 2012

Course Blog

The purpose of this blog is to document my coursework this semester and keep the links to resources in one place.