Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • testing Online Quiz - 6
  • Identify the issues in the code below ```vbs Set con = ...

Identify the issues in the code below

Set con = CreateObject("ADODB.Connection") 
con.Open "Provider=Microsoft.ACE.OLEDB.12.0;
Data source=C:\...\Database1.accdb" 
rs = con.Execute("select * from Table1") 
rs.MoveFirst 
Do While rs.EOF     
    Msgbox rs.Fields(0).Name & " : " &rs.Fields(0).Value & " " & rs.Fields(1).Name & " : " &rs.Fields(1).Value & " " & rs.Fields(2).Name & " : " & rs.Fields(2).Value  
Loop 
rs.Close 
con.Close  

Issue1) SQL query is issued as an argument to an incorrect method Issue2) Condition with the loop is incorrect Issue3) Code is not designed navigate to the next record in the recordset Issue4) Connection string is incorrectly formed Issue5) Msgbox cannot display data from Database Issue6) Set keyword is missing in a statement

technology testing
  1. Issue2, Issue3, Issue6

  2. Issue1, Issue2, Issue3

  3. Issue2, Issue4, Issue6

  4. No issues - The code is perfect


Show answer
Correct Option: A

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy