Programming Microsoft SQL Server 2000 with Microsoft Visual Basic .Net - P9
Số trang: 50
Loại file: pdf
Dung lượng: 0.00 B
Lượt xem: 9
Lượt tải: 0
Xem trước 5 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Tham khảo tài liệu programming microsoft sql server 2000 with microsoft visual basic .net - p9, công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic .Net - P9 • • End Sub • • • Private Sub Button1_Click(ByVal sender As System.Object, _ • ByVal e As System.EventArgs) Handles Button1.Click • • ’Move to first row and populate text boxes. • Session(“MyRowID”) = 0 • MoveToRow() • • End Sub • • Private Sub Button2_Click(ByVal sender As System.Object, _ • ByVal e As System.EventArgs) Handles Button2.Click • • ’Move to previous row and populate text boxes. • If Session(“MyRowID”) > 0 Then • Session(“MyRowID”) -= 1 • End If • MoveToRow() • • End Sub • • • Private Sub Button3_Click(ByVal sender As System.Object, _ • ByVal e As System.EventArgs) Handles Button3.Click • • ’Move to next row and populate text boxes. • If Session(“MyRowID”) < _ • Ds1.Tables(“Products”).Rows.Count - 1 Then • Session(“MyRowID”) += 1 • End If • MoveToRow() • • End Sub • • • Private Sub Button4_Click(ByVal sender As System.Object, _ • ByVal e As System.EventArgs) Handles Button4.Click • • ’Move to last row and populate text boxes. • Session(“MyRowID”) = Ds1.Tables(“Products”).Rows.Count - 1 • MoveToRow() • • End Sub • Cr e a t in g D a t a ba se Obj e ct s fr om W e b Pa ge s Your applicat ions will som et im es need t he availabilit y of cust om dat abase obj ect s. For exam ple, st or ed pr ocedur es, w hich st ore pr ecom piled, opt im ized SQL code, are great for m anaging dat a m anipulat ion t asks, such as insert ing new recordsPlease purchase PDF Split-Merge on www.verypdf.com to remove this watermark. int o a t able, and dat a definit ion t asks, such as dynam ically creat ing a new t able. I f you happen t o creat e a cust om t able for y our applicat ion, y our applicat ion can probably also benefit from one or m or e st ored procedur es perform ing dat a m anipulat ion t asks for t he t able. For exam ple, your applicat ion can pass t he st ored procedure param et ers specify ing t he colum n values for a new row, and t he st ored procedure can ex ecut e t he I NSERT I NTO st at em ent . I f your applicat ion needs t he value for a colum n w it h an I dent it y propert y cr eat ed on t he SQL Ser ver inst ance, t he st ored procedure can r et ur n it as an out put param et er . The sam ple for t his sect ion dem onst rat es t he cr eat ion of a t able and a st or ed procedur e. The sam ple is t he set up program for t he next sect ion t hat dem onst rat es how t o pr ogram dat a m anipulat ion t asks. Specifically , y ou w ill lear n how t o creat e a t able and a st or ed pr ocedur e on a SQL Serv er inst ance from an ASP.NET applicat ion. Figur e 11- 20 shows t he Web page for t he sam ple. The page’s nam e is WebFr om 1.aspx, and it r esides in t he Set upForWebUpdat eSam ple proj ect . The page includes t wo but t ons and a hy per link. The but t ons have Text propert y set t ings r eflect ing t he t ext t hey show. The but t on I D propert y set t ings are But t on1 for t he t op but t on and But t on2 for t he one below it . The hy per link cont r ol has t wo design- t im e pr opert y set t ings. First , it s Text propert y specifies t he m essage t o display when rendered on a Web page. Second, t he Navigat eUr l propert y designat es t he URL of t he page t o w hich t o pass c ...
Nội dung trích xuất từ tài liệu:
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic .Net - P9 • • End Sub • • • Private Sub Button1_Click(ByVal sender As System.Object, _ • ByVal e As System.EventArgs) Handles Button1.Click • • ’Move to first row and populate text boxes. • Session(“MyRowID”) = 0 • MoveToRow() • • End Sub • • Private Sub Button2_Click(ByVal sender As System.Object, _ • ByVal e As System.EventArgs) Handles Button2.Click • • ’Move to previous row and populate text boxes. • If Session(“MyRowID”) > 0 Then • Session(“MyRowID”) -= 1 • End If • MoveToRow() • • End Sub • • • Private Sub Button3_Click(ByVal sender As System.Object, _ • ByVal e As System.EventArgs) Handles Button3.Click • • ’Move to next row and populate text boxes. • If Session(“MyRowID”) < _ • Ds1.Tables(“Products”).Rows.Count - 1 Then • Session(“MyRowID”) += 1 • End If • MoveToRow() • • End Sub • • • Private Sub Button4_Click(ByVal sender As System.Object, _ • ByVal e As System.EventArgs) Handles Button4.Click • • ’Move to last row and populate text boxes. • Session(“MyRowID”) = Ds1.Tables(“Products”).Rows.Count - 1 • MoveToRow() • • End Sub • Cr e a t in g D a t a ba se Obj e ct s fr om W e b Pa ge s Your applicat ions will som et im es need t he availabilit y of cust om dat abase obj ect s. For exam ple, st or ed pr ocedur es, w hich st ore pr ecom piled, opt im ized SQL code, are great for m anaging dat a m anipulat ion t asks, such as insert ing new recordsPlease purchase PDF Split-Merge on www.verypdf.com to remove this watermark. int o a t able, and dat a definit ion t asks, such as dynam ically creat ing a new t able. I f you happen t o creat e a cust om t able for y our applicat ion, y our applicat ion can probably also benefit from one or m or e st ored procedur es perform ing dat a m anipulat ion t asks for t he t able. For exam ple, your applicat ion can pass t he st ored procedure param et ers specify ing t he colum n values for a new row, and t he st ored procedure can ex ecut e t he I NSERT I NTO st at em ent . I f your applicat ion needs t he value for a colum n w it h an I dent it y propert y cr eat ed on t he SQL Ser ver inst ance, t he st ored procedure can r et ur n it as an out put param et er . The sam ple for t his sect ion dem onst rat es t he cr eat ion of a t able and a st or ed procedur e. The sam ple is t he set up program for t he next sect ion t hat dem onst rat es how t o pr ogram dat a m anipulat ion t asks. Specifically , y ou w ill lear n how t o creat e a t able and a st or ed pr ocedur e on a SQL Serv er inst ance from an ASP.NET applicat ion. Figur e 11- 20 shows t he Web page for t he sam ple. The page’s nam e is WebFr om 1.aspx, and it r esides in t he Set upForWebUpdat eSam ple proj ect . The page includes t wo but t ons and a hy per link. The but t ons have Text propert y set t ings r eflect ing t he t ext t hey show. The but t on I D propert y set t ings are But t on1 for t he t op but t on and But t on2 for t he one below it . The hy per link cont r ol has t wo design- t im e pr opert y set t ings. First , it s Text propert y specifies t he m essage t o display when rendered on a Web page. Second, t he Navigat eUr l propert y designat es t he URL of t he page t o w hich t o pass c ...
Tìm kiếm theo từ khóa liên quan:
thủ thuật máy tính công nghệ thông tin tin học quản trị mạng computer networkTài liệu liên quan:
-
52 trang 433 1 0
-
24 trang 359 1 0
-
Top 10 mẹo 'đơn giản nhưng hữu ích' trong nhiếp ảnh
11 trang 320 0 0 -
Làm việc với Read Only Domain Controllers
20 trang 310 0 0 -
74 trang 303 0 0
-
96 trang 298 0 0
-
Báo cáo thực tập thực tế: Nghiên cứu và xây dựng website bằng Wordpress
24 trang 291 0 0 -
Đồ án tốt nghiệp: Xây dựng ứng dụng di động android quản lý khách hàng cắt tóc
81 trang 286 0 0 -
EBay - Internet và câu chuyện thần kỳ: Phần 1
143 trang 277 0 0 -
Tài liệu hướng dẫn sử dụng thư điện tử tài nguyên và môi trường
72 trang 270 0 0