Create the script to create the ms sql table

Assignment Help PL-SQL Programming
Reference no: EM13909609

Database table: MosaicVisits

I have a database table named "MosaicVisits" attached. I would like to create search page to retrieve and display the data from the database table either search by the LastName or between a date range. For example, I can select the option search by LastName and enter last name into the textbox and click on Submit button, records associated to that LastName will display.

Or you can select to search by a date range. For example, the start date is 1/14/2013 and end date is 2/11/2013. Once you click on the Submit button, the following records will display.

VisitID Tech_ID LastName PurposeStudy PurposeSocial PurposeGroupProjects PurposeOther Ethnicity VisitDate
19 11053394 Ford 0 1 0   White 1/14/2013 9:44
17 12339966 Anderson 0 1 0   AfricanAmerican 1/14/2013 9:39
58 12339966 Anderson 1 1 0     1/16/2013 9:00
89 12339966 Anderson 1 1 0     1/18/2013 9:03
67 12339966 Anderson 1 0 0     1/17/2013 8:45
78 288982 Johnson 1 0 0   Asian 1/17/2013 11:50
28 713754 Vang 0 1 0   Asian 1/14/2013 12:25
25 234567 Vang 1 1 0   Asian 1/14/2013 10:56
118 234567 Vang 1 1 0   Asian 1/23/2013 10:53
190 10996760 Vang 1 0 0   Asian 2/11/2013 11:18

You can only perform one search option at a time. All leading zero should also display.

Below are what I need:

1. Create the script to create the MS SQL table

2. Create the script to create a store procedure

3. Create c# script that connect to the store procedure named MosaicVisitsDB.CS.

Below is a sample of the c# format to connect to the store procedure.

using System;
usingSystem.Collections.Generic;
usingSystem.Configuration;
usingSystem.Data;
usingSystem.Data.SqlClient;
usingSystem.Linq;
usingSystem.Web;

///<summary>
/// Summary description for StdntLookupDB
///</summary>
publicenumQueryType
{
ByLastName,
ByTechID
}

publicclassStudentDB
{
publicSqlDataReaderGetStudents(QueryTypequeryType, stringqueryText)
{
// Create Instance of Connection (establishing the SQL Server connection)
varmyConnection = newSqlConnection(ConfigurationManager.ConnectionStrings["ARDevConn"].ConnectionString);

//Create SqlCommandObj (usp_GetStudentInfoByLastName will be the name of the store procedure)
varmyCommand = newSqlCommand("usp_getstudentdata", myConnection);

// Mark the Command as a Store Procedure
myCommand.CommandType = CommandType.StoredProcedure;

//Set up params
varparamFilterBy = newSqlParameter("@FilterBy", SqlDbType.Int, 8);
paramFilterBy.Value = (int)queryType;
myCommand.Parameters.Add(paramFilterBy);

varparamFilterText = newSqlParameter("@FilterText", SqlDbType.NVarChar, 50);
paramFilterText.Value = queryText;
myCommand.Parameters.Add(paramFilterText);

// Open the connection
myConnection.Open();
//Execute the Command
SqlDataReader result = myCommand.ExecuteReader(CommandBehavior.CloseConnection);

//Return the datareader result
return result;
}
}

4. Create the search web page by either the LastName or between a date range in asp.net 2013.

5. Create c# handler or code behind to perform the function, which will connect the store procedure to the search web page form.

Attachment:- Data.rar

Reference no: EM13909609

Questions Cloud

To finance its ongoing construction project : To finance its ongoing construction project, Bowen-Roth Inc. will need $5,000,000 of new capital during each of the next 3 years. The firm has a choice of issuing new debt or equity each year as the funds are needed, or issue only debt now and equity..
Find a right eigenvector for each distinct eigenvalue : Find a right eigenvector for each distinct eigenvalue, and show that the eigenvalue of multiplicity 2 does not have two linearly independent eigenvectors.
What is the approximate price of the leyda bond : Assume that Leyda Inc. has an outstanding bond with a 6.5% annual coupon, exactly 10 years to maturity, a par value of $1000 and a yield of 5%. The bond is convertible into 100 shares of Leyda stock, which is currently priced at $10.25 per share. Wha..
Residual dividend policy and maintains a debt-equity ratio : Northern Foods has aftertax earnings of $43,200 for the year. The firm adheres to a residual dividend policy and maintains a debt-equity ratio of .6. The firm needs $45,000 for capital investment. How much will the firm pay out in dividends from this..
Create the script to create the ms sql table : Create the script to create the MS SQL table, Create the script to create a store procedure, Create c# script that connect to the store procedure named MosaicVisitsDB.CS
Common stock and the investment banking process : Which of the following statements concerning common stock and the investment banking process is NOT CORRECT?
Weighing the merits of leasing the equipment or purchasing : Stanley Inc. must purchase $6,000,000 worth of service equipment and is weighing the merits of leasing the equipment or purchasing. The company has a zero tax rate due to tax loss carry-forwards, and is considering a 5-year, bank loan to finance the ..
Write brief description abott laboratories including sector : Write a brief description of Abott Laboratories including the sector, products, key executives (CEO, CFO, COO) information - name, education, years of experience. You may use yahoo finance, morningstar or any financial websites. One page
Develop a specific set of realistic question : Develop a specific set of realistic questions (at least five per member) that you will ask each of the three executive team members based on their specific roles, responsibilities, and perspectives regarding the causes of the operating losses and the..

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd