C2090-733 Free Dumps Study Materials
Question 14: Given the following table definition:CREATE TABLE staff ( id SMALLINT NOT NULL,
name
VARCHAR(9), dept SMALLINT, job CHAR(5)) Assuming that the following statements
execute
successfully:Dim cmdStaff As DB2Command = cnDb2.CreateCommand()
cmdStaff.CommandText =
"SELECT name FROM staff WHERE (job = @job)" Which of the following is the correct way
to provide a
value for the parameter marker used?
A. cmdStaff.Parameters.Add("@job", "Mgr", CType(5, Char))
B. cmdStaff.Parameters.Add("@job", "Mgr", DB2Type.Char, 5)
C. cmdStaff.Parameters.Add(New DB2Parameter("@job", CType(5, Char))
cmdStaff.Parameters("@job").Value = "Mgr"
D. cmdStaff.Parameters.Add(New DB2Parameter("@job", DB2Type.Char, 5)
cmdStaff.Parameters("@job").Value ="Mgr"
Correct Answer: D