- Questions & Answers
- Get Coins
Consider the example code shown in Figures 8-10, 8-11, and 8-12. Assume that instead of accessing data from a local server, you are going to access data from a cloud provider that offers the appropriate application server (e.g., ASP.NET) and database technologies. What changes, if any, do you have to make to the example code segment(s)?
Reference figure 8-11
Reference figure 8-12
Changes required to access the data using cloud provider
Instead of accessing the data from the local server, it is easy to access the data with the help of cloud provider, which would offer appropriate application server and the various technologies of database.
Change of code in figure 8-10 and 8-11:
While analyzing the code in figure 8-10 and 8-11, it is necessary to change the connection string in the following code:
• The following code contains how the connection string is connected to the database, and it needs to be changed from figure 8-10:
• The following code contains how the connection string is connected to the database, and it needs to be changed from figure 8-11:
• The above highlighted code is essentially required to connect to the database, and it needs to be changed with the help of connection string provided by the cloud services.
Therefore, the only necessary change required is the connection of strings within the identifier part of the name and address fields required in the database with which the connection is required.
Change of code in figure 8-12:
• In the code of figure number 8-12, there is no change required within the code.
Therefore, while setting up the system, it is necessary to do the discussed changes to connect the services of cloud provider.