Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5.6 Figure 5.14 shows a fragment of code that implements the login functionality for a database application. The code dynamically builds an SQL query and

image text in transcribed

5.6 Figure 5.14 shows a fragment of code that implements the login functionality for a database application. The code dynamically builds an SQL query and submits it to a database 1. String login, password, pin, query 2. login= getParameter ("login 3. password- getParameter ("pass") 3. pin getParameter ("pin") ; 4. Connect!n conn .createC nnection ("MyDataBase") 5. query"SELECT accounts FROM users WHERE login-" login + "'AND pass = '" + password + " 'AND pin-"+ pin; 8. Resultset result-conn.executeQuery (query) 9. if (result !=NULL) 10 11 else 12 displayAccounts (result): displayAuthFailed (); Figure 5.14 Code for Generating an SQL Query a Suppose a user submits login, password, and pin as doe, secret, and 123. Show the SQL query that is generated b. Instead, the user submits for the login field the following or 1 1 What is the effect

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions

Question

What is the environment we are trying to create?

Answered: 1 week ago