Explanation of Solution
a.
Deleting query in the table “GUIDE”:
Public Function GuideDelete(I_GUIDE_NUM)
Dim strSQL As String
strSQL = "DELETE FROM GUIDE WHERE GUIDE_NUM = '"
strSQL = strSQL & I_GUIDE_NUM
strSQL = strSQL & "'"
DoCmd.RunSQL strSQL
End Function
Explanation:
- Create a function named as “GuideDelete” and pass an argument “I_GUIDE_NUM”.
- Set the “strSQL” string variable to “DELETE FROM GUIDE WHERE GUIDE_NUM = '” and makes everything necessary in the command up to and including the single quotation mark preceding the order number.
- The next command will concatenated previous value with the value in “I_GUIDE_NUM”.
- The final command is used to set “strSQL” to the output of the value already created, concatenated with a single quotation mark...
Explanation of Solution
b.
Updating query:
Public Function GuideUpdate(I_GUIDE_NUM, I_LAST_NAME)
Dim strSQL As String
strSQL = "UPDATE GUIDE SET LAST_NAME = '"
strSQL = strSQL + I_LAST_NAME
strSQL = strSQL + "' WHERE GUIDE_NUM = '"
strSQL = strSQL & I_GUIDE_NUM
strSQL = strSQL & "'"
DoCmd.RunSQL strSQL
End Function
Explanation:
- Create a function named as “GuideUpdate” and pass the arguments “I_GUIDE_NUM” and “I_ LAST_NAME”.
- Set the “strSQL” string variable to “UPDATE GUIDE SET LAST_NAME = '” and makes everything necessary in the command up to and including the single quotation mark preceding the order number.
- Here, the user pass two arguments, so there are two portions of the construction of the SQL command that involve variables...
Explanation of Solution
c.
Retrieving the list in the table “RESERVATION”:
Public Function FindReservations(I_CUSTOMER_NUM)
Dim rs As New ADODB.Recordset
Dim cnn As ADODB.Connection
Dim strSQL As String
Set cnn = CurrentProject.Connection
strSQL = "SELECT RESERVATION_ID, TRIP_ID, NUM_PERSONS, TRIP_PRICE FROM RESERVATION WHERE CUSTOMER_NUM = '"
strSQL = strSQL & I_CUSTOMER_NUM
strSQL = strSQL & "'"
rs.Open strSQL, cnn, adOpenStatic, , adCmdText
Do Until rs.EOF
Debug.Print (rs!RESERVATION_ID)
Debug.Print (rs!TRIP_ID)
Debug.Print (rs!NUM_PERSONS)
Debug.Print (rs!TRIP_PRICE)
rs.MoveNext
Loop
End Function
Explanation:
- Create a function named as “Find_Reservations” and pass an argument “I_CUSTOMER_NUM”.
- The “rs” and “cnn” is used to processing the “Recordset” and “ADODB.Connection”.
- Set the “strSQL” string variable to “SELECT RESERVATION_ID, TRIP_ID, NUM_PERSONS, TRIP_PRICE FROM RESERVATION WHERE CUSTOMER_NUM = '” and makes everything necessary in the command up to and including the single quotation mark preceding the order number...
Trending nowThis is a popular solution!
Chapter 8 Solutions
A GUIDE TO SQL
- Please original work select a topic related to architectures or infrastructures (Data Lakehouse Architecture). Discussing how you would implement your chosen topic in a data warehouse project Please cite in text references and add weblinksarrow_forwardPlease original work What topic would be related to architectures or infrastructures. How you would implement your chosen topic in a data warehouse project. Please cite in text references and add weblinksarrow_forwardWhat is cloud computing and why do we use it? Give one of your friends with your answer.arrow_forward
- What are triggers and how do you invoke them on demand? Give one reference with your answer.arrow_forwardDiscuss with appropriate examples the types of relationships in a database. Give one reference with your answer.arrow_forwardDetermine the velocity error constant (k,) for the system shown. + R(s)- K G(s) where: K=1.6 A(s+B) G(s) = as²+bs C(s) where: A 14, B =3, a =6. and b =10arrow_forward
- • Solve the problem (pls refer to the inserted image)arrow_forwardWrite .php file that saves car booking and displays feedback. There are 2 buttons, which are <Book it> <Select a date>. <Select a date> button gets an input from the user, start date and an end date. Book it button can be pressed only if the start date and ending date are chosen by the user. If successful, it books cars for specific dates, with bookings saved. Booking should be in the .json file which contains all the bookings, and have the following information: Start Date. End Date. User Email. Car ID. If the car is already booked for the selected period, a failure message should be displayed, along with a button to return to the homepage. In the booking.json file, if the Car ID and start date and end date matches, it fails Use AJAX: Save bookings and display feedback without page refresh, using a custom modal (not alert).arrow_forwardWrite .php file with the html that saves car booking and displays feedback. Booking should be in the .json file which contains all the bookings, and have the following information: Start Date. End Date. User Email. Car ID. There are 2 buttons, which are <Book it> <Select a date> Book it button can be pressed only if the start date and ending date are chosen by the user. If successful, book cars for specific dates, with bookings saved. If the car is already booked for the selected period, a failure message should be displayed, along with a button to return to the homepage. Use AJAX: Save bookings and display feedback without page refresh, using a custom modal (not alert). And then add an additional feature that only free dates are selectable (e.g., calendar view).arrow_forward
- • Solve the problem (pls refer to the inserted image) and create line graph.arrow_forwardwho started the world wide webarrow_forwardQuestion No 1: (Topic: Systems for collaboration and social business The information systems function in business) How does Porter's competitive forces model help companies develop competitive strategies using information systems? • List and describe four competitive strategies enabled by information systems that firms can pursue. • Describe how information systems can support each of these competitive strategies and give examples.arrow_forward
- A Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology PtrNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage LearningProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning