Q 41. Describe the parameters used when a stored procedure is used to insert data.
A. You generally have one input parameter for each field in the underlying table. It is also common to have output parameters that return error and status information, as well as the identity value of the row that the stored procedure inserted.
Q 42 . Why would you create temporary tables?
A. You create temporary tables to share data between procedures or to help you to accomplish complex tasks.
Q 43 . Explain what a trigger is.
A. A trigger is like an event procedure that runs when data changes. You create triggers that respond to inserts, updates, and deletes.
Q 44. Explain why you use triggers.
A. Developers use triggers to enforce business rules and even to perform tasks such as inserting data into any audit log.
Q 45. Explain why ADO.NET is superior to its predecessors.
A. ADO.NET is superb at dealing with disparate data formats and scalability in enterprise situations. It provides one programming model for accessing all types of data, no matter in what format it is stored and where it is stored. It utilizes XML to accomplish this task. Finally, ADO.NET is focused on disconnected operations, contributing to its scalability.
Q 46. Name four methods of the SqlCommand object and explain what they do.
A. The ExecuteReader method returns a forward-only DataReader object. The ExecuteScalar method returns a result of one column and one row. The ExecuteNonQuery method returns no results (you use it, for example, to update data). The ExecuteXLMReader method returns an XML version of a DataReader object.
Q 47. Explain the benefits of the SqlDataReader object.
Q 48. Discuss the process of building and executing a Visual Basic .NET stored procedure.
A. You must first write the stored procedure in the Visual Basic .NET language within a Visual Studio .NET class. You then build the project. You must then declare the stored procedure within SQL Server Management Studio Express. Finally, you can execute it just as you would any other stored procedure.
Q 49 . Explain what logical flow is within a stored procedure.
A. Logical flow is when you want to react differently within a stored procedure depending on certain situations. For example, you may want to respond in a special manner if a parameter is passed in as NULL.
Q 50. Describe the purpose of output parameters.
A. Output parameters enable you to supply information back to the calling program about what happened within the stored procedure.
No comments:
Post a Comment