12.07.2015 Views

MỤC LỤC - lib

MỤC LỤC - lib

MỤC LỤC - lib

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Bài Giảng Môn Lập Trình Website ASP.Netd. Điều khiển SQL DataSource và thủ tục nội tạiTương tự như trường hợp kết nối CSDL bằng phát biểu SQL ta có thể sử dụng điềukhiển kết nối CSDL SqlDatasource để truy cập CSDL SQL Server bằng thủ tục nội tại (StoredProcedure)Ví dụ trong CSDL SQLServer QLBanSach ta tạo 1 thủ tục (Stored Procedure)Sachtheogia cho phép liệt kê các quyển sách với 2 tham số cho Procedure là Giatu và Giaden.Use QLBansachCreate Proc Sachtheogia@Giatu int, @Giaden IntasSelect Masach, Tensach, Dongia, Mota, Tenchude, TenNXB,NgaycapnhatFrom sach s, Chude c, nhaxuatban nWhere c.MaCD=s.MaCD and n.MaNXB=s.MaNXB and Dongia Between @Giatu and@GiadenLưu ý : Trong thủ tục có khai báo 2 tham số tên @Giatu và @GiadenKhi cấu hình Data Source cho điều khiển SqlDataSourcewww.Beenvn.comBiên sọan: Dương Thành Phết Trang 66

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!