Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft Exam DP-420 Topic 10 Question 32 Discussion

Actual exam question for Microsoft's DP-420 exam
Question #: 32
Topic #: 10
[All DP-420 Questions]

You have a database in an Azure Cosmos DB Core (SQL) API account.

You need to create an Azure function that will access the database to retrieve records based on a variable named accountnumber. The solution must protect against SQL injection attacks.

How should you define the command statement in the function?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Goldie
11 days ago
Hey, at least it's not as bad as Bobby Tables' dad. That guy's a real troublemaker!
upvoted 0 times
Robt
2 days ago
A) cmd = \'SELECT * FROM Persons p WHERE p.accountnumber = 'accountnumber'
upvoted 0 times
...
...
Tarra
12 days ago
Wait, what's SQL injection? I thought we were just retrieving some records. Did I miss something important here?
upvoted 0 times
...
Antonio
20 days ago
I agree with Amie. Option C is the way to go to ensure the security of the database.
upvoted 0 times
...
Cyndy
22 days ago
I'm not sure, but I think option D might also work.
upvoted 0 times
...
Amie
23 days ago
Option C is the correct answer. Using parameterized queries is the best way to protect against SQL injection attacks.
upvoted 0 times
Wynell
1 days ago
So we should always use parameterized queries when accessing databases in Azure functions.
upvoted 0 times
...
Cammy
8 days ago
Yes, you're right. Parameterized queries help protect against SQL injection attacks.
upvoted 0 times
...
Dulce
9 days ago
I think the correct answer is C) cmd = \'SELECT * FROM Persons p WHERE p.accountnumber = @accountnumber\'
upvoted 0 times
...
...
Stevie
29 days ago
I agree with Minna, option C protects against SQL injection attacks.
upvoted 0 times
...
Minna
1 months ago
I think the correct answer is C.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77