Home > Products > UltraDev > Support > Editing Database Records
Dreamweaver UltraDev Icon Macromedia Dreamweaver UltraDev Support Center - Editing Database Records
Understanding ASP command objects

A command object is a server object that performs a database operation. The object can contain any valid SQL statement, including one that returns a recordset, or one that inserts, updates, or deletes records in a database. A command object can alter the structure of a database if the SQL statement adds or deletes a column in a table. You can also use a command object to run a stored procedure in a database.

A command object can be reusable, in the sense that the application server can reuse a single compiled version of the object to execute the command a number of times. You can make a command reusable by setting the Prepared property of the Command object to True, as in the following VBScript statement:

mycommand.Prepared = True

If you know the command will be executed more than a few times, having a single compiled version of the object can make database operations more efficient.

Note: Not all database providers support prepared commands. If your database does not support them, it might return an error when you set this property to True. It might even ignore the request to prepare the command and set the Prepared property to False.

A command object is created by scripts on an ASP page, but UltraDev lets you create command objects without writing a line of ASP code. The rest of this article describes how to use the rapid application development (RAD) tools in UltraDev to create ASP command objects.

To Table of Contents Forward to next document