【正文】
通過指定數(shù)據(jù)庫中的表只能被存儲過程修改,可以確保數(shù)據(jù)更安全。為什么應該創(chuàng)建和使用存儲過程而不是在代碼中直接使用SQL字符串呢?主要有以下幾個理由:? 存儲過程被數(shù)據(jù)庫編譯過。與Connection對象相似, Command對象可以運行返回記錄集和不返回記錄集兩種類型的命令。在ODBC接口中的數(shù)據(jù)庫應用請求定義,是在具體的數(shù)據(jù)庫模塊訪問驅動程序中別實現(xiàn)的。 應用程序的用戶能增加請求驅動程序的軟件組成部分,此驅動程序是請求和具體的DBMS之間的接口。(4)遠程存儲過程遠程存儲過程是從連接到不同服務器的遠程服務器或客戶機調用的存儲過程。存儲過程是包裝重復任務有效執(zhí)行的一種方式,支持用戶聲明的變量,條件執(zhí)行和其他強功能的程序設計特性。應用后的應用程序管理。使得應用程序最優(yōu)化的使用硬件,并允許未來的擴展;標識和建模數(shù)據(jù)庫對象和應用程序邏輯,規(guī)定每個對象的信息類型和關系的類型。數(shù)據(jù)庫應用程序的性質和復雜性,以及計劃數(shù)據(jù)庫的過程,它們之間的差異是非常大的。Internet 處理分為3層,業(yè)務和表示服務位于Web服務器上,客戶機使用簡單的瀏覽器。N層 處理在數(shù)據(jù)庫服務器、應用程序服務器和客戶機之間劃分。以數(shù)據(jù)庫為中心的視點設計的團體應用程序是這種設計的一個例子。 體系結構設計典型的應用程序部署選項包括:智能服務器(兩層) 大多數(shù)的處理發(fā)生在服務器上,而表示服務在客戶機上處理。一個很好設計的數(shù)據(jù)庫要求極少的更改通常更有效的執(zhí)行。ADO可以從Microsoft Visual Basic, Visual Basic for Applications, Active Server Pages(ASP)和Microsoft Internet Explorer腳本對象模型中使用。ODBC 這是一個調用級的接口,它直接訪問SQL Server TDS協(xié)議,并支持使用ODBC的數(shù)據(jù)對象接口寫的應用程序或組件。SQL Server提供對兩大類數(shù)據(jù)庫API的固有支持,而這些API有確定可以使用的數(shù)據(jù)對象接口。開放數(shù)據(jù)服務自動監(jiān)聽在服務器上安裝的所有服務器網(wǎng)絡庫。SQL Server支持這樣的一些網(wǎng)絡協(xié)議:TCP/IP,命名管道,NOVELL IPX/SPX,BANYAN VINES/IP和APPLETALK ADSP。be quicker than their equivalent SQL statements. To use a stored procedure you just put the name of the stored procedure as the mandtables can be modified only by stored procedures. This means that potentiallyto run, as they don39。string on the fly, as in the example shown above? Well, there are several reasons: A stored procedure is piled by the database. This produces an executiont matter whether you use a Connection, a Command, or a Recordset. ProceduresThe use of stored procedures is the one area where the Command object es into global temporary stored procedures are available for all user sessions.Remote Stored Procedures Remote stored procedures are a legacy feature of SQL Server environment. Extended stored procedures are typically identified by the xp_prefix. They are executed in a manner similar to that of stored procedures.6. ODBC PurposeThe Microsoft Open Database Connectivity (ODBC) interface is a C programming language interface that makes it possible for applications to access data from a variety of database management systems (DBMSs). The ODBC interface permits maximum interoperability—an application can access data in diverse DBMSs through a single interface. Furthermore, that application will be independent of any DBMS from which it accesses data. Users of the application can add software ponents called drivers, which interface between an application and a specific DBMS.Open Database Connectivity (ODBC) is a widely accepted application programming interface (API) for database access. It is based on the CallLevel Interface (CLI) specifications from X/Open and ISO/IEC for database APIs and uses Structured Query Language (SQL) as its database access language.ODBC is designed for maximum interoperability—that is, the ability of a single application to access different database management systems (DBMSs) with the same source code. Database applications call functions in the ODBC interface, which are implemented in databasespecific modules called drivers. The use of drivers isolates applications from databasespecific calls in the same way that printer drivers isolate word processing programs from printerspecific mands. Because drivers are loaded at run time, a user only has to add a new driver to access a new DBMS。Creating the database and database objects, including tables, data integrity mechanisms, data entry an