Chủ đề 1 Stored-Procedure & Trigger & Function pptx

Chủ đề 1 Stored-Procedure & Trigger & Function pptx

Ngày tải lên : 24/07/2014, 15:22
... quản trị CSDL Bài tập Stored- Procedure Vào Query Analysis, viết store -procedure CSDL hành: 1.1 Store-Prodedure đơn giản 1) Viết stored- procedure In dòng ‘Hello’ 2) Viết stored- procedure In dòng ‘Xin ... 1.2 Store-Prodedure có vòng lặp 12) Viết stored- procedure Nhập vào số nguyên @n In số từ đến @n 13) Viết stored- procedure Nhập vào số nguyên @n In tổng số chẵn từ đến @n 14) Viết stored- procedure ... 5) Viết stored- procedure Nhập vào số @s1,@s2 In tổng @s1+@s2 6) Viết stored- procedure Nhập vào số @s1,@s2 In câu ‘Tổng : @tg’ với @tg=@s1+@s2 7) Viết stored- procedure Nhập vào số...
4 1.5K 28
Stored Procedure and Advanced T-SQL

Stored Procedure and Advanced T-SQL

Ngày tải lên : 25/08/2012, 09:00
... extend stored procedure xem system stored procedure ngược lại Remote Stored Procedure : Những stored procedure gọi stored procedure server khác Viết Stored Procedure Tên thông tin Stored Procedure ... người ta nói đến stored procedure nói đến loại Local stored procedure thường viết DBA programmer Chúng ta bàn cách tạo stored prcedure loại phần Temporary Stored Procedure : Là stored procedure tương ... trực tiếp Ngoài stored procedure encrypt (mã hóa) để tăng cường tính bảo mật Các Loại Stored Procedure Stored procedure chia thành nhóm sau: System Stored Prcedure : Là stored procedure chứa...
10 1K 3
Gọi thực thi Stored Procedure

Gọi thực thi Stored Procedure

Ngày tải lên : 28/08/2012, 11:13
... Thực thi thông qua Stored procedure a Cách tạo Stored Procedure - Tạo Stored Procedure, chọn New Stored Procedure Hướng dẫn thực hành NMCNPM tin học sinh sau: Tạo Stored Procedure thêm thông ... thi Stored Procedure sp_InsertHocSinh thông qua chương trình: Để thêm thông tin học sinh, gọi thực thi Stored Procedure sp_InsertHocSinh sau: - Hướng dẫn thực hành NMCNPM Sau thực thi, Stored Procedure ... dụ: 25/10/1980 chương trình lỗi tháng 25???) Sinh viên tìm hiểu xử lý cho vấn đề Gợi ý: Trong Stored Procedure dùng hàm Convert để xử lý - ...
9 1.4K 11
SQLServer2000 - Manipulate Data and Stored Procedure

SQLServer2000 - Manipulate Data and Stored Procedure

Ngày tải lên : 04/09/2012, 10:16
... Tungvn40@yahoo.com Cong Minh CDROM 70 NCT F2 Q10 Return Using VB or VB.NET to execute the ‘AddNewOrder’ stored procedure 10 Using xp_cmdshell extended stored procedure to send a message (xp_cmdshell ‘net send ... Exists(SELECT OrderID FROM [Orders] WHERE OrderID=@OrderID) BEGIN SELECT @Result=1 ROLLBACK TRANSACTION END Else BEGIN INSERT INTO [Orders] (OrderID,ProductName,CustomerID) VALUES(@OrderID,@ProductName,@CustomerID) ... Exists(SELECT OrderID FROM [Orders] WHERE OrderID=@OrderID) BEGIN SELECT @Result=1 ROLLBACK TRANSACTION END Else BEGIN INSERT INTO [Orders] (OrderID,ProductName,CustomerID) VALUES(@OrderID,@ProductName,@CustomerID)...
3 492 0
SQL stored procedure testing

SQL stored procedure testing

Ngày tải lên : 05/10/2013, 14:20
... common design pattern for SQL stored procedures is one in which the stored procedure returns one or more values into out parameters This pattern is necessary when the stored procedure returns a ... testing Because the process of testing stored procedures often changes the database containing the stored procedures (because stored procedures often insert, update, or delete data), you certainly not ... keyword only accepts int types The pattern is also necessary when the stored procedure must return more than one value You call a stored procedure with an out parameter just as you would a stored...
28 516 1
Stored Procedure and Advance T-SQL

Stored Procedure and Advance T-SQL

Ngày tải lên : 06/10/2013, 17:20
... extend stored procedure xem system stored procedure ngược lại Remote Stored Procedure : Những stored procedure gọi stored procedure server khác 6.4.3 Viết Stored Procedure Tên thông tin Stored Procedure ... người ta nói đến stored procedure nói đến loại Local stored procedure thường viết DBA programmer Chúng ta bàn cách tạo stored prcedure loại phần Temporary Stored Procedure : Là stored procedure tương ... trực tiếp Ngoài stored procedure encrypt (mã hóa) để tăng cường tính bảo mật 6.4.2 Các Loại Stored Procedure Stored procedure chia thành nhóm sau: System Stored Prcedure : Là stored procedure chứa...
8 409 0
Stored Procedure and Advance T

Stored Procedure and Advance T

Ngày tải lên : 01/11/2013, 17:20
... extend stored procedure xem system stored procedure ngược lại Remote Stored Procedure : Những stored procedure gọi stored procedure server khác 6.4.3 Viết Stored Procedure Tên thông tin Stored Procedure ... ta nói đến stored procedure nói đến loại Local stored procedure thường viết DBA programmer Chúng ta bàn cách tạo stored prcedure loại phần 3 Temporary Stored Procedure : Là stored procedure tương ... trực tiếp Ngoài stored procedure encrypt (mã hóa) để tăng cường tính bảo mật 6.4.2 Các Loại Stored Procedure Stored procedure chia thành nhóm sau: System Stored Prcedure : Là stored procedure chứa...
8 433 0
Debugging a SQL Server Stored Procedure

Debugging a SQL Server Stored Procedure

Ngày tải lên : 07/11/2013, 13:15
... that are outside of a stored procedure It is not possible to step into a stored procedure from managed or unmanaged code, or into managed or unmanaged code from a stored procedure Set a breakpoint ... the stored procedure or in the reentry point in the code as required Alternatively, open the code or stored procedure and right-click on the line to break on Select Run to Cursor from the shortcut ... determines that they will not be dynamically loaded for each statement execution or reference For more information about debugging SQL stored procedures, see the topic "Debugging SQL" in the MSDN...
3 423 0
stored procedure

stored procedure

Ngày tải lên : 08/12/2013, 08:16
... truy vấn thành câu lệnh SQL để thực thi hàm UDF chạy: Tổng kết LINQ to SQL supports the ability to call Stored Procedures and UDFs within the database and nicely integrate them into our data ... lớp thực thể Product hay Order Ví dụ, cho có thủ tục tênGetProductsByCategory CSDL trả thông tin sản phẩm giống sau: Cũng trước đây, ta tạo phương thức GetProductsByCategory bên lớp DataContext ... DataContext, trước tiên mở cửa sổ Server Explorer VS 2008 mở danh sách SPROC CSDL: Bạn nháy đúp vào thủ tục SPROC để mở chỉnh sửa chúng, ví dụ “CustOrderHist” Northwind đây: Để ánh xạ vào SPROC vào...
14 360 0
Cập nhật cơ sở dữ liệu bằng stored procedure

Cập nhật cơ sở dữ liệu bằng stored procedure

Ngày tải lên : 08/12/2013, 08:16
... “Add New Stored Procedure : Sau ta tạo thêm thủ tục có tên “InsertOrder” có nhiệm vụ chèn thêm ghi vào bảng Orders: Hãy ý cách SPROC định nghĩa tham số OrderID tham số dạng OUTPUT Đó cột OrderID ... trực tiếp Bước 3: Thêm Order cách dùng SPROC Chúng ta bắt đầu chuyển mô hình liệu sang dùng SPROC, đối tượng Object Đầu tiên, đến cửa sổ “Server Explorer” mở rộng nhánh Stored Procedures CSDL chúng ... hoặc: 2) Thêm lớp partial NorthwindDataContext vào dự án, viết phương thức partial tương ứng với thao tác Insert/Update/Delete (ví dụ: InsertOrder, UpdateOrder, DeleteOrder) mà gọi thực Insert/Update/Delete...
18 491 0
Tài liệu Executing a SQL Server Stored Procedure By Using ActiveX Data Objects doc

Tài liệu Executing a SQL Server Stored Procedure By Using ActiveX Data Objects doc

Ngày tải lên : 14/12/2013, 20:16
... the routine in A.8 executed, click on the button with the caption Stored Procedure with Parameter, located on the frmMain form for this Appendix project ... Try End Sub The last thing that this routine does is open a recordset based on the Command object This is to the use just those records that are needed In this case, the GetString method is used ... ADODB.ParameterDirectionEnum.adParamInput, 5) cmd.Parameters.Append(prm) prm.Value = "CHOPS" OpenNorthwindADOConnection(cnn) cmd.ActiveConnection = cnn rstCurr.Open(cmd) txtResults.Text = rstCurr.GetString...
2 450 0
Tài liệu Raising and Handling Stored Procedure Errors pptx

Tài liệu Raising and Handling Stored Procedure Errors pptx

Ngày tải lên : 24/12/2013, 05:15
... SqlCommand("SP0210_Raiserror", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@Severity", SqlDbType.Int); cmd.Parameters.Add("@State", SqlDbType.Int); // Set the value for the stored procedure ... 2-12 RAISERROR error message severity levels Severity level Description 0-10 Informational 11-16 Error which can be corrected by the user 17-19 Resource or system error 20-25 Fatal error indicating ... object If the error has severity level 11 or greater, a SqlException is thrown by the SQL Server NET data provider For more information about the RAISERROR function, look up RAISERROR in SQL Server...
4 372 0
Tài liệu Retrieving Stored Procedure Return Values Using a DataReader docx

Tài liệu Retrieving Stored Procedure Return Values Using a DataReader docx

Ngày tải lên : 24/12/2013, 05:15
... data value to the stored procedure The parameter is both an input and output parameter, allowing the caller InputOutput to pass a data value to the stored procedure and the stored procedure to pass ... allowing the stored procedure to pass a data value back to the caller ReturnValue The parameter represents the value returned from the stored procedure Return parameters from the stored procedure ... SqlCommand("SP0212_ReturnValueWithDataReader", conn); cmd.CommandType = CommandType.StoredProcedure; // Define the input parameter for the command cmd.Parameters.Add("@ValueIn", SqlDbType.Int); // Set the...
4 339 0
Tài liệu Stored Procedure và T-SQL pptx

Tài liệu Stored Procedure và T-SQL pptx

Ngày tải lên : 19/01/2014, 21:20
... bỏ stored procedure Chúng ta xem ví dụ sau Stored Procedure: Ðể tạo stored procedure bạn dùng Enterprise Manager click lên Stored Procedure -> New Stored Procedure Trong ví dụ ta tạo stored procedure ... extend stored procedure xem system stored procedure ngược lại Viết Stored Procedure Tên thông tin Stored Procedure tạo chứa SysObjects table phần text chứa SysComments table Vì Stored Procedure ... cách tạo stored prcedure loại phần * Temporary Stored Procedure : Là stored procedure tương tự local stored procedure tồn connection tạo chúng bị đóng lại SQL Server shutdown Các stored procedure...
9 505 2
Tài liệu Using a Single Stored Procedure to Update Multiple Changes to a SQL Server Database pdf

Tài liệu Using a Single Stored Procedure to Update Multiple Changes to a SQL Server Database pdf

Ngày tải lên : 21/01/2014, 11:20
... records in the DataSet to the stored procedure NText parameter @data and the XML representation of deleted records in the DataSet to the stored procedure NText parameter @datadelete The stored procedure ... const String TABLENAME = "TBL0811"; private const String STOREDPROCEDURE_NAME = "SP0811_Update"; // private void StoredProcedureMultipleRowsForm_Load(object sender, System.EventArgs e) { ds = new ... SqlCommand( ); cmd.Connection = conn; cmd.CommandText = STOREDPROCEDURE_NAME; cmd.CommandType = CommandType.StoredProcedure; // Inserted and updated records if (ds.HasChanges(DataRowState.Added | DataRowState.Modified))...
7 442 0
Tài liệu Getting Stored Procedure Parameter Information at Runtime ppt

Tài liệu Getting Stored Procedure Parameter Information at Runtime ppt

Ngày tải lên : 26/01/2014, 10:20
... stored procedure: sp_sproc_columns The second technique is specific to Microsoft SQL Server The system stored procedure sp_sproc_columns returns parameter information for one or more stored procedures ... require a stored procedure Command object Executing this procedure returns a result set in which the rows correspond to stored procedure columns For more information about the parameter information ... retrieving information about parameters for only a single stored procedure by specifying the name of the stored procedure in the @procedure_ name parameter See SQL Server Books Online for other parameters...
4 292 0
MySQL Stored Procedure Programming pptx

MySQL Stored Procedure Programming pptx

Ngày tải lên : 07/03/2014, 04:20
... rights reserved There are three major types of MySQL stored programs: Stored procedures Stored procedures are the most common type of stored program A stored procedure is a generic program unit ... term stored procedures to refer to both stored procedures and stored functions While this is technically inaccurate (a function is not a procedure) , we felt that the title MySQL Stored Procedure ... Optimizing Stored Programs 18 Stored Program Security 421 Permissions Required for Stored Programs Execution Mode Options for Stored Programs Stored Programs...
638 4.4K 0
STORED PROCEDURE TRONG SQL SERVER (PHẦN CƠ BẢN) pot

STORED PROCEDURE TRONG SQL SERVER (PHẦN CƠ BẢN) pot

Ngày tải lên : 29/03/2014, 12:20
... Căn Hiểu Stored Procedure SQL Server Tạo vài Stored Procedures (ở mức bản) MICROSOFT STUDENT PARTNER 2009 NỘI DUNG :   Phần : Tổng quan Stored Procedure (Khái Niệm, Phân Loại Stored Procedure) ... loại Stored Procedure :  Chủ yếu có loại : Thủ tục Hệ Thống (System Stored Procedure) Thủ tục Người Dùng tạo (User – Defined Stored Procedure) MICROSOFT STUDENT PARTNER 2009 10 1.3.1 System Stored ... TỔNG QUAN VỀ STORED PROCEDURE MICROSOFT STUDENT PARTNER 2009 1.1 Giới thiệu Stored Procedure (SP) :   Store Procedure (SP) : “A precompiled collection of Transact-SQL statements stored under...
40 2K 2
sql server 2000 stored procedure and xml programming 2nd ed 2003

sql server 2000 stored procedure and xml programming 2nd ed 2003

Ngày tải lên : 10/04/2014, 09:42
... Recompiling Stored Procedures Storing Stored Procedures Managing Stored Procedures Listing Stored Procedures ... of Procedures 259 Types of Stored Procedures User-Defined Stored Procedures System Stored Procedures Extended Stored Procedures ... Basic Operations with Stored Procedures What Are Stored Procedures? Execution of Stored Procedures from Query Analyzer Managing Stored Procedures from Enterprise...
697 901 0
bài 4 stored procedure và giao dịch

bài 4 stored procedure và giao dịch

Ngày tải lên : 23/05/2014, 16:13
... dung học trước Làm việc với kiểu liệu Mã kịch Stored Procedure & Giao dịch Mục tiêu Stored Procedure Giao dịch Stored Procedure & Giao dịch Stored Procedure & Giao dịch Các tùy chọn lập trình ... dụng lời gọi Stored Procedure thay viết thực thi lại tập hợp câu lệnh Cách sử dụng biến, cấu trúc điều khiển Stored Procedure tương tự mã kịch Stored Procedure & Giao dịch Ví dụ Stored Procedured ... SQL> Stored Procedure & Giao dịch 21 Demo xóa/chỉnh sửa nội dung Stored Procedure Câu lệnh tạo Stored Procedure CREATE PROC spVendorState @State varchar(20) AS SELECT VendorName FROM Vendors WHERE...
36 437 0

Xem thêm