PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

WHERE ID = ?

Consider the following statement:
prepStmt = dbConn.prepareStatement (” DELETE
FROM MyTable
WHERE ID = ?”);

The prepStmt member is of type PreparedStatement. The dbConn member is of type Connection
and represents a connection to a database. The ID column is an int data type. The value for the ?
placeholder in the SQL statement is held by a member variable named id. The id member’s value
was acquired via a getPhmaryKey() method. Which of the following statements would properly
execute the statement given in this question?

How should Mario rewrite the first line to correct the errors?

Mario is debugging his colleagues SQL statement and ASP code. He finds at least four errors in
the following section of code:
<%
SQL1 = UPDATE mytableSET LocID=0007,Material=13 1/4 Description=T-shirts ListPrice=35

WHERE
CusID=97
SQL2 = INSERT INTO authors (AU_ID, author, year_born) VALUES (7000, Joe Smith,1950)
SQL3 = SELECT * from atable where state = MD and year born<1955
key=request.querystring(“id”)
au=request.querystring(“author”)
birthyear=request.querystring(“year”)
SQLstmt=”INSERT INTO authors (AU_ID, author, year_born) VALUES (” SQLstmt= SQLstmt &
key
& “,”
SQLstmt= SQLstmt & author & “,”
SQLstmt= SQLstmt & birthyear & “)” %>
How should Mario rewrite the first line to correct the errors?

which these activities occur during a typical interaction between a client and an EJB?

Consider the following four activities that occur during a typical interaction between a client and an
enterprise bean:
1 .A reference to an EJB home object is returned to the client.
2.A reference to the EJB object is returned to the client.
3.JNDI is used to acquire a reference to an enterprise bean’s home object.
4.The client requests the bean’s home object to create or find an enterprise bean.
Which choice lists the correct order in which these activities occur during a typical interaction

between a client and an EJB?


Page 243 of 263« First...102030...241242243244245...250260...Last »