Sunteți pe pagina 1din 1

Review AFSS

Using the MS SQL Server 2005, create a database named Test and write scripts to make the
following functions .
a. Create a table named MyProducts into “ Test” database contain columns : (5 marks)
- ProductID int , identity , primary key
- ProductName varchar(50)
- UnitPrice float
- Quantity int
- SubTotal float
b. Create a assembly named ProductManager.dll contain a class named Product have a method
named CalSubTotal:
float CalSubTotal ( float UnitPrice , int Quantity ) : return UnitPrice * Quantity .
Then this assembly registered into Test database to use CalSubTotal method as the Function
in SQL Server and create a function named fnSubTotal(...parameters....) invoke to
CalSubTotal method. (20 marks)
c. In Test database , create data for the Product table (5 records) by using INSERT command
and fnSubTotal function.(10 marks)
d. Create a store procedure named spAllProducts : get all information of the Product table. (20
marks)
e. Expose “spGetAllStock” store procedure become a Web method .(25 marks)
f. Create a Web Application invoke to “spGetAllStock” WebMethod . (20 marks)

1 Review AFSS | Set 03

S-ar putea să vă placă și