Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN 6710 - Section A – TR 9:30-10:45 CRN 10570 – Section B – TR 5:30-6:45.

Slides:



Advertisements
Similar presentations
Intro to Access 2007 Lindsey Brewer CSSCR September 18, 2009.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
NMED 3850 A Advanced Online Design February 25, 2010 V. Mahadevan.
PHP (2) – Functions, Arrays, Databases, and sessions.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Agenda – Week 5, Day 2 Complete RoboHelp Tutorial Transition to HTML Tutorial –Warm-up – Explore HTML –Page Design – Create a page –Publishing – Make your.
Creating a Web Page HTML, FrontPage, Word, Composer.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
MySQL + PHP.  Introduction Before you actually start building your database scripts, you must have a database to place information into and read it from.
D2L Notes Be sure to submit your link in the dropbox provided on D2L You can just upload an empty text file if a file upload is required Do not use D2L.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
© 2003 By Default! A Free sample background from Slide 1 Week 2  Free PHP Hosting Setup  PHP Backend  Backend Security 
PHP meets MySQL.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
UNIT 9.2 Learning Objectives A Real world Application of Databases – The Money Ball Example The Money Ball Example Data Warehouses – The Role of Data Warehouses.
UNIT 9.2: Learning Objectives Agile Development – Bruce Feiler on Agile Programming Database access from code – Database Cycle Review – SQL Command Types.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
Introduction to MySQL Lab no. 10 Advance Database Management System.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
SYST Web Technologies SYST Web Technologies Databases & MySQL.
Database and mySQL Week 07 Dynamic Web TCNJ Jean Chu.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
ASP.NET The Clock Project. The ASP.NET Clock Project The ASP.NET Clock Project is the topic of Chapter 23. By completing the clock project, you will learn.
CHAPTER 7 Form & PHP. Introduction All of the following examples in this section will require two web pages. The first page retrieves information posted.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
Introduction to FrontPage and Web Page Design. Topics Logging in to your site Creating a webpage Text formatting Page backgrounds Linking webpages Links.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
PHP Programming. Topics Database Handling (MySQL, MSSQL, ODBC)
Hubnet Training One Health Network South East Asia Network Overview | Public and Members-only Pages; Communicating and Publishing using Blogs and News.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Task #1 Create a relational database on computers in computer classroom 308, using MySQL server and any client. Create the same database, using MS Access.
HTML Forms.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
HTML Hyper Text Markup Language. The Basics u HTML documents contain “tags” which instruct the Browser software on how to present the information within.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
Introduction to MySQL  Working with MySQL and MySQL Workbench.
HTML Hyper Text Markup Language. Agenda Basics Tools Important tags Tables & databases Forms Publishing at Stern.
FrontPage & Web Page Design. Starting FrontPage Click on the FrontPage icon in the task bar at the bottom of the screen or Locate it from the programs.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
ASP.NET Programming with C# and SQL Server First Edition
BASIC PHP and MYSQL Edward S. Flores.
Unit 9.2 Database access from code Database Cycle Review
PHP.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2016 Section DA MW 4:05-5:20
Presentation transcript:

Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45

MSSQL Microsoft SQL is almost identical to MySQL Limiting result count MySQL: Limit # //at end of query MSSQL: Top # //after SELECT Table name/fields MySQL: wrapped in backticks ` MSSQL: wrapped in square brackets [ ] Most of the other differences aren’t needed in what we are doing in this course

MSSQL Log in to GoDaddy and get to the Database screen Add New Database Type: Microsoft SQL Server Create a DB user and password, make a note of these for use in our application Click on Webadmin next to the MSSQL database This will open a tool called myLittleAdmin that GoDaddy offers for managing the MSSQL database

Tables Unfortunately, there is an issue with the way GoDaddy has this tool set up, and the GUI table builder is not available On left hand side, click on “Tools” and then on “New Query” Use the following query to create a table (you can modify this slightly when you are ready to create a table for your lab)

Tables CREATE TABLE [example]( [id] [int] IDENTITY(1,1) NOT NULL, [first] [varchar](50) NOT NULL, [last] [varchar](50) NOT NULL, CONSTRAINT [PK_example] PRIMARY KEY CLUSTERED ( [id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]

Tables Now that the table is created, we can use the GUI environment to insert a row and look at the contents of the table

VS2013 Now we need to add our connection string to our application web.config file Inside of the tags add the following:

VS2013 I’m going to create another page with just two text fields to gather the first and last name for our insert query Go ahead and add the require validators to both I will also set up a button and an onClick function In C# we need to include try/catch blocks around most of our query commands to catch any possible exceptions

Connect SqlConnection conn = new SqlConnection( ConfigurationManager.ConnectionStrings[“connectionString Name”].ConnectionString); try{ conn.Open(); OutputLabel.Text = “Connected”; conn.Close(); conn.Dispose(); }catch(Exception ex){ OutputLabel.Text = “Failed to connect” + ex.Message; }

Insert conn.Open(); SqlCommand cmd = conn.CreateCommand(); cmd.CommandText = “INSERT INTO example (first, last) VALUES (‘’”+first.Text+”, ‘”+last.Text+”’)”; try{ cmd.ExecuteNonQuery(); outputLabel.Text = “Insert Success”; }catch(Exception ex2){ outputLabel.Text = “Failed insert” + ex2.Message; } conn.Close();

GridView There are several ways to output content from a database To get some raw output on the page, we are going to use the GridView control from the Data section in the toolbox We can do all of the configuration for this control from the smart tag in the split screen view

Publish Site Now that we have tested all of our pages and features, we are ready to publish the pages to our web server In a web application project like the one we have built, the files we need to upload are all of the.aspx,.master, and the.dll files in the bin folder GoDaddy is set up to run PHP and.NET in the same site, so I’m just going to add a folder to our existing site for the.NET application

Web Site vs Project From the File menu, we can create a Project like the one we did together, or we can create a Web Site In a project, our code is compiled into the.dll file we had to upload earlier In a Web Site, the code is not pre-compiled, so we would have to upload all of the site files, but there wouldn’t be a.dll file

Web Site vs Project There are pro’s and con’s to both approaches For content with complex code, having it precompiled can produce a better response time, as the server doesn’t have to compile the page when it is requested For a web site, you can edit the code behind file directly on the server, and on the next page load, you will see the changes Having the site precompiled into a.dll can make it a little more challenging to recreate the code files in case the original project is lost, but not impossible

Lab 6 – C#/MSSQL Due: Nov 5 Create a simple web form in C#.NET Minimum: 2 Text Fields, 1 Drop Down (include a blank option), 2 Radio Buttons grouped together, 3 Checkboxes, 1 Submit Button Create a MSSQL DB and Table to store the form submissions Ensure the form is properly validating all fields before inserting the data into the DB Output an HTML table containing the values in your DB table

Lab 5 - AJAX I’ve gotten several questions about the AJAX lab You need to create 2-3 pages Page 1 should have at least two AJAX calls on it Page 2/3 should be the pages called by the AJAX and return data in HTML format and JSON format When returning data in JSON format, ensure there are no HTML tags showing up on the page (doctype, head, body, etc) If you want to try something other than DB interaction, you can try out uploading a file through AJAX as an alternative to one of the two calls mentioned above

Next Week Next Week we will be looking at using 3 rd party APIs, such as Google Maps, Calendar, Facebook, etc Reminders: Lab 5 (AJAX) is due Today Lab 6 (C#) is due on Nov 5 th Project 2 is due on Nov 5 th Term Project is due on Dec 10 th