tailieunhanh - sams teach Yourself windows Script Host in 21 Days phần 8

thêm về khả năng của Phiên bản Chưa đăng ký Chia Simpo PDF Merge và đối tượng kết nối, bao gồm hỗ trợ cho các giao dịch, trong tài liệu hướng dẫn cho các đối tượng kết nối sau này đối tượng ADO lớn cuối cùng mà bạn cần phải hiểu là các đối tượng Command. | mSimpoPDFMergetiandf Split UnregisteredeVersioni-S ittp transactions in the documentation for the Connection object later in this chapter. The last major ADO object that you need to understand is the Command object. The Command object represents a SQL statement a table name or a stored procedure. You can use it as a convenient way to call a stored procedure that you might use multiple times it has methods and properties that allow you to describe the characteristics of the stored procedure. Later in the chapter you can find more details about the Command object and you can see examples of its usage. The ADO objects are easy to use from WSH and you can exploit them for numerous purposes. Any time you need to retrieve store or modify data you can use the ADO objects to go directly to a database system. In this chapter you ll see reference information for each object make sure that you review the examples for the objects because they ll show you basic usage of the objects from ADO. After the reference material for each object we ll take a step back and review some of the ways that you can use ADO from WSH to perform useful tasks. Connection Object The Connection object is the root of the ADO object hierarchy. It represents a connection to an OLE DB data source. The connection may be the equivalent of an actual network connection to a database server in a client server system. Connection Properties Property Name Description Attributes This returns or sets the characteristics of a connection. The valid attributes for a connection include the following constants adXactCommitRetaining ensures that calling CommitTrans will automatically start a new transaction adXactAbortRetaining ensures that calling RollbackTrans will automatically start a new transaction. CommandTimeout This specifies how many seconds to wait while executing a command before returning an error and terminating the command request. The default value is 30 seconds. If a command doesn t .