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?

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?

A.
UPDATEmytable SET LocID=’0007′,Material = ’13 1/4′, Description = ‘T-shirts’, List Price=35
WHERE
CusID=97

B.
UPDATE mytableSET LocID=’0007′,Material=’13 1/4′, Description=T-shirts, List_Price=35
WHERE
CusID=97

C.
UPDATEmytable SET LocID=’0007′,Material=’13 1/4′, Description=’T-shirts’, List_Price=35
WHERE
CusID=97

D.
UPDATEmytable SET LocID=’0007′,Material=13 1/4, Description=’T-shirts’, List Price=35
WHERE
CusID=97



Leave a Reply 0

Your email address will not be published. Required fields are marked *