PrepAway - Latest Free Exam Questions & Answers

Tag: whats a tblcustomer table

What should you do to successfully delete the data from the tblCustomers table?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The application connects to a Microsoft SQL Server 2005 database.

You write the following two DDL statements.

CREATE TABLE tblCustomers(
CustID INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
CompanyName VARCHAR(50) NOT NULL,
ContactName VARCHAR(100) NOT NULL)
GO

CREATE TABLE tblCustomerOrders(
OrderID INT IDENTITY(1,1) NOT NULL,
CustID INT NOT NULL FOREIGN KEY REFERENCES tblCustomers(CustID),
OrderDate DateTime NOT NULL)

When a user attempts to delete the data from the tblCustomers table during execution, the application throws a SqlException exception.
The application was designed without any DataRelation objects.

You need to successfully delete the data from the tblCustomers table.

What should you do?