home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


You can use the two methods shown in Table 33.9 to modify the Field object.

Table 33.9 The Field Object Methods

Method Description

AppendChunk appends data to the field
GetChunk gets data from the field

The Command Object You can use the Command object to execute parameterized queries and stored procedures. To execute the query, you must specify the ActiveConnection and query. Listing 33.6 shows an example of creating a new Recordset object by using the Command object.

Listing 33.6 Creating a New Recordset object by using the Command object


Set myRecordset=Server.CreateObject(ADODB.Command)
myRecordset.ActiveConnection=“myCompany”
myRecordset.CommandText=“qryGetActiveEmployees”
myRecordset.Execute

Table 33.10 details the properties associated with the Command object.

Table 33.10 The Command Object Properties

Property Description

ActiveConnection Indicates the Connection object for the Command object.
CommandText Indicates the command the data source will execute.
CommandTimeout Specifies the amount of time (in seconds) the data source will wait for the command to execute. The default is 30 seconds.
CommandType Indicates the type of command the data source will execute.
Prepared Used to tell the data provider to compile the command before execution.

Table 33.11 lists the Command object methods.

Table 33.11 The Command Object Methods

Method Description

CreateObject creates a new Command object
Execute executes the command contained within the Command object’s CommandText property

Error Object Methods The Error object logs any error messages returned from a database query. The entire group of error messages is known as the Error collection. Tables 33.12 and 33.13 list the Error collection properties and methods, respectively.

Table 33.12 The Error Collection Properties

Property Description

Count Indicates the total number of Error objects within the Error collection.
Item Indicates the specific Error object within the Error collection. The object is identified by number or name.


Table 33.13 The Error Collection Methods

Method Description

Clear removes all Error objects from the Error collection

The Error object itself has the properties described in Table 33.14.

Table 33.14 The Error Object Properties

Property Description

Description description of the error
HelpContext help topic within the help file to provide context-sensitive information about the error
HelpFile help file’s name
NativeError error code specific to the data provider
Number ID uniquely identifying the error
Source name of the application returning the error
SQLState five-digit SQL error code

The Parameter Object The Parameter object is used to pass names of values of parameters to a stored procedure. It has the properties and methods detailed in Tables 33.15 and 33.16, respectively.

Table 33.15 The Parameter Object Properties

Property Description

Attributes indicates the type of data the Parameter object will accept
Direction indicates whether the parameter is an input, output, or both
Name parameter’s name
NumericScale scale for numeric parameter values
Precision precision for numeric parameter values
Size Parameter object’s maximum size
Type parameter’s data type
Value parameter’s value


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.