Upwork Test
Upwork Test
Upwork Test
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
You are creating an ASP.NET application that is hosted on your companys Web server. You want to access a database
Answers
1. Begin a transaction
2. Create a connection to the database
3. Create a data set using an adapter object
4. Use the data set to display data or to change items in the database
5. Update the database from the data set
6. Close the database connection
7. Check for transaction errors
Which of the following are aggregate functions in SQL?
Answers:
1. Avg
2. Select
3. Order By
4. Sum
5. Union
6. Group by
7. Having
You create an ASP.NET application for an online insurance site PremiumInsurance. A page named PersonalDetails.asp
PersonalDetails.aspx had a TextBox control named MemberID in which the user can enter a Personal MemberID. The H
<asp:TextBox ID=MemberID Columns=20 Runat=server/>
You need to implement a TextChanged event handler for MemberID. You want this event handler to retrieve information
will then be redisplayed with additional information about the vehicle obtained from the XML Web service.
You are implementing the TextChanged event handler. Which two courses of action should you take? (Each correct an
Answers
1. In the Page directive for PersonalDetails.aspx, ensure that the AutoEventWireup attributes is set to true.
2. In the Page directive for PersonalDetails.aspx, ensure that the EnableViewState attribute is set to true.
3. In the MemberID HTML element, ensure that the AutoPostback attribute is set to false. Include code for the
4. In the MemberID HTML element, ensure that the AutoPostback attribute is set to true. Include code in the Te
The simplest query must include at least________ and _________.
Answers:
1. A select clause
2. A where clause
3. A from clause
4. A group by clause
5. A having clause
6. An order by clause
You are the software engineer for Premium Corp.. One of the pages in an ASP.NET application contains the following d
The assembly named MyAssembly contains a custom server control named CSC1. Which of the following code sample
Answers:
1. <WoodySideBankControls:CSC1 id=Control1 runat=server />
2. <WoodySideBankNameSpace:CSC1 id=Control1 runat=server />
3. <WoodySideBankControls:Control1 id=CSC1 runat=server />
4. <WoodySideBankNameSpace:Control1 id=CSC1 runat=server />
LAST_NAME DEPARTMENT_ID SALARY
ALLEN 10 3000
MILLER 20 1500
King 20 2200
Davis 30 5000
Which of the following Subqueries will execute without any error?
Answers:
1. SELECT distinct department_id FROM employees Where salary = (SELECT AVG(salary) FROM employees G
2. SELECT distinct department_id FROM employees Where salary > (SELECT AVG(salary) FROM employees G
3. SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employ
4. SELECT distinct department_id FROM employees Where salary > ALL (SELECT AVG(salary) FROM employe
5. SELECT distinct department_id FROM employees Where salary < (SELECT AVG(salary) FROM employees G
What will happen if you query the emp table as shown below:
select empno, DISTINCT ename, Salary from emp;
Answers:
Answers:
1.
2.
3.
4.
Command
Locals
Output
Breakpoints
1. 4
2. 2
3. 1
4. .5
5. .25
6. 0
7. 8
8. 24
Is it possible to insert several rows into a table with a single INSERT statement?
Answers:
1. No
2. Yes
You use a Command object to retrieve employee names from the employee table in the database. Which of the followin
Answers:
1. DataRow
2. DataSet
3. DataTable
4. DataReader
Which of the following are the valid methods of the SqlTransaction class?
Answers:
1. Commit
2. Terminate
3. Save
4. Close
5. Rollback
Which of the two statements is true?
(a)MSIL code is platform independent
(b)CLR is platform dependent
Answers:
Consider the following two statements relating to ASP.NET and choose the most appropriate option:
Statement 1: Value types are allocated on a stack
Statement 2: Reference types are allocated on a managed CLR Heap
Answers:
You are creating an ASP.NET application that will be used by companies to quickly create information portals customiz
variables for use by the page in your application. You need your application to initialize these text strings only when th
Answers:
1. Add code to the Application_OnStart event handler in the Global.asax file to set the values of the text strings.
2. Add code to the Application_BeginRequest event handler in the Global.asax file to set the values of the text st
3. Add code to the Session_OnStart event handler in the Global.asax file to set the values of the text strings.
4. Include code in the Page.Load event handler for the default application page that sets the values if the text str
5. IsPostback property of the Page object is False.
6. Include code in the Page.Load event handler for the default application page that sets the values of the text st
Examine the code given below:
SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000
You are creating an ASP.NET page for Premium Consultants. You create a GridView control that displays past purchase
the page is created. The page contains TextBox controls that allow users to update their personal information, such as
as possible when users update their contact information.
What should you do?
Answers:
Sam is developing an application that enables the users to perform read and write operations on text files. He uses str
files that were opened in the Finally block. Which of the following is true regarding the Finally block?
Answers:
You are creating an ASP.NET application that will record each customers entry. It is possible that thousands of entries
servers. As customers enter information into your application, maintaining state information will be important. This inf
that a Web server is restarted. Customers will enter data into three separate pages in your application. Which of the fo
Answers:
1. View State
2. Hidden fields
3. State Server
4. Application state
5. SQL Server
You are creating an ASP.net application to enter timesheet data intuitively. Users will enter data using a DataGrid. You h
to allow users to initiate some calculations on the data in the grid. Which event does the DataGrid control raise when t
Answers:
1. EditCommand
2. OnClick
3. ButtonClicked
4. ItemCommand
Which line of code should you use to copy the edited rows from dataset productInfo into another dataset productChan
Answers:
1. productChanges = productInfo.GetChanges(DataRowState.Detached)
2. productChanges = productInfo.GetChanges()
3. productChanges.Merge(productInfo, true)
4. productChanges.Merge(productInfo, false)
You are maintaining data for its products in the Products table, and you want to see those products, which are 50 item
The structure of the Products table is:
ProductID
ProductName
CurrentStock
MinimumStock
Two possible queries are:
(a)select * from products where currentStock > MinimumStock + 50
(b)select * from products where currentStock 50 > MinimumStock
Choose the appropriate option with regard to the above queries.
Answers:
1. (a) is correct
2. (b) is correct
4. Use Microsoft SQL Server stored procedures for the data calculations
You are creating an ASP.NET Web site for your company. The Web site will use both Microsoft(R) .NET Framework serv
create a Setup and Deployment project to package the ActiveX controls. Which project type should you create?
Answers:
1. Cab
2. Merge Module
3. Web Setup
4. Setup
Which one of the following correctly selects rows from the table myTable that have null in column c
Answers:
1. SELECT * FROM myTable WHERE column1 is null
2. SELECT * FROM myTable WHERE column1 = null
3. SELECT * FROM myTable WHERE column1 EQUALS null
4. SELECT * FROM myTable WHERE column1 NOT null
5. SELECT * FROM myTable WHERE column1 CONTAINS null
You need to install an online parcel tracking application and its supporting assemblies so that the a
Programs Control Panel applet. What should you do?
Answers:
1. Use a Web installation package for the Web application. Use the Global Application Cache (GAc)utility, GACU
2. Use Xcopy deployment for the Web application and its supporting assemblies.
3. Use Xcopy deployment to deploy the Web application. Use merge modules to install the supporting assemblie
4. Use a Web installation package to install the Web application and the supporting assemblies.
Which of the following is not a valid SQL operator?
Answers:
1. Between..and..
2. Like
3. In
4. Is null
5. Having
6. Not in
7. All of the above are valid.
You create an ASP.NET page that allows a user to enter a requested delivery date in a TextBox control named txtDelDa
that 60 business days after the order date. You add a CustomValidator control to your page. In the Properties window,
entered in the txtDelDate TextBox control falls within the acceptable range of values. In addition, you need to minimize
Answers:
1. Set the AutoPostBack property of txtDelDate to False. Write code in the ServerValidate event handler to valida
2. Set the AutoPostBack property of txtDelDate to True. Write code in the ServerValidate event handler to valida
3. Set the AutoPostBack property of txtDelDate to False. Set the ClientValidationFunction property to the name o
4. Set the AutoPostBack property of txtDelDate to True. Set the ClientValidationFunction property to the name of
36. What will happen if the Server configuration file and the Application configuration file have diffe
Answers:
Your company, StoreIt Inc has stored the text of several journals in a Microsoft SQL Server 7.0 database. Each sentenc
granularity. Several of these works are many thousands of printed pages in length. You are building a Web application
Web application requests large amounts of text, your application must return it in the most efficient manner possible. H
response to the user?
Answers:
1. Use a RichTextBox object to hold the data as it is being concatenated.
2. Use the Append method of the String class.
3. Use the String class and the & operator.
4. Use the StringBuilder class.
The sales database contains a customer table and an order table. For each order there is one and only one customer, a
key fields be placed into the design of this database?
Answers:
1. A primary key should be created for the customer_id field in the customer table and also for the
2. A primary key should be created for the order_id field in the customer table and also for the cus
3. A primary key should be created for the customer_id field in the customer table and a foreign ke
4. A primary key should be created for the customer_id field in the customer table and a foreign ke
5. None of these
You want to access data from the Customer table in the database. You generate a DataSet named MyDataSet by ad
the data from the database into MyDataSet which has been loaded with multiple tables, using a SqlDataAdapter nam
Answers:
1. MyAdapter.Fill(MyDataSet,Customer)
2. MyAdapter.Fill(MyDataSet,Customer)
3. MyAdapter.Fill(MyDataSet)
4. MyAdapter.Fill(MyDataSet)
What is the order of precedence among the following operators?
1 IN
2 NOT
3 AND
4 OR
Answers:
1. 1,2,3,4
2. 2,3,4,1
3. 1,2,4,3
4. 1,4,3,2
5. 4,3,2,1
6. 4,1,2,3
7. 4,2,1,3
8. 3,2,1,4
Which query will display data from the Pers table relating to Analysts, clerks and Salesmen who joined between 1/1/20
Answers:
1. select * from Pers where joining_date from 1/1/2005 to 1/2/2005, job= Analyst or clerk or salesman
2. select * from Pers where joining_date between 1/1/2005 to 1/2/2005, job= Analyst or job= clerk or job= sa
3. select * from Pers where joining_date between 1/1/2005 and 1/2/2005 and (job= Analyst or clerk or salesm
4. None of the above
43. What is the correct order of clauses in the select statement?
1 select
2 order by
3 where
4 having
5 group by
Answers:
1. 1,2,3,4,5
2. 1,3,5,4,2
3. 1,3,5,2,4
4. 1,3,2,5,4
5. 1,3,2,4,5
6. 1,5,2,3,4
7. 1,4,2,3,5
8. 1,4,3,2,5
Which of the following queries is valid?
Answers: