Starting from:

$30

PROG2110- Lab 3 ASP Net My SQL Connection

Work in groups of 2

Objectives:
Relational Databases – PROG2110 LAB 03
- Demonstrate the ability to connect to a remote MySQL database
- Demonstrate the ability to use a remote MySQL database
- Complete the exercise and demonstrate before the end of the lab period

Requirements:

1. You must use two computers.
a. Computer A runs the MySQL database and will be used to query the database.

b. Computer B runs a program to query or populate the MySQL database on Computer A. 2. On Computer A

a. Create a database called SampleDb
b. Create a table called Sample in the SampleDb database with the following columns:

i. SampleId (integer) as a key with auto numbering

ii. SampleData as a variable character string of up to 10 characters (should be validated)
c. Create a user called “superuser” with access from any host, and with full privileges. This user should be used to connect to db.

This can be done by issuing the following command in the MySQL command environment:

CREATE USER 'superuser'@'%' IDENTIFIED BY 'Password1'; GRANT ALL PRIVILEGES ON SampleDb.* TO 'superuser'@'%';

3. On Computer B, run a program (Look the sample app provided to you in Module 06 called MySQL .NET Demo. ) that you write with the following specifications:

a. Create new app called SampleApp (ASP.NET web app) similar to MySQL .NET Demo windows app b. User should be able to list all, list specific record or to insert new.

When inserting new duplicates should not be allowed. Also, after record is inserted display all records including new one. c. When list all is specified data should be sorted in ascending order by SampleData.
d. Use appropriate ADO.NET objects to retrieve and insert data. You will be asked questions why did you used certain objects.

Submit (to the eConestoga Dropbox for the course):
- A single zipped folder with copies of the source code files (C# and SQL) ONLY, making sure they are properly commented

More products