[thelist] Friday ASP Problem
Scott Dexter
sgd at ti3.com
Fri Apr 7 12:38:43 2000
> -----Original Message-----
> From: Ewing, Christopher [mailto:CEwing@sscinc.com]
> Set RSCat = ConnCat.Execute(CatSQL)
>
> The error I'm getting is on the Set RSCat = ConnCat.Execute
> line. The error
> is:
>
> No value given for one or more required parameters
>
the ADO Connection Execute method does have parameters for it other than the
command text, but they're optional, or at least defined as such in the docs,
maybe your version of the ASP engine needs to be updated (there have been a
couple upgrades to it) ... here's the full function prototype:
Set recordset = connection.Execute (CommandText, RecordsAffected, Options)
CommandText = your SQL statement
RecordsAffected (optional) = a variable that after execution will hold the
value of the number of records affected by the CommandText
Options (optional) = indicates how the provider (driver) handles the query,
can be one or more of CommandTypeEnum values or ExecuteOptionEnum values
CommandTypeEnum values are (use the adovbs.inc file to use the names below):
adCmdUnspecified (-1) Does not specify the command type argument.
adCmdText (1) Evaluates CommandText as a textual definition of a command or
stored procedure call.
adCmdTable (2) Evaluates CommandText as a table name whose columns are all
returned by an internally generated SQL query.
adCmdStoredProc (4) Evaluates CommandText as a stored procedure name.
adCmdUnknown (8) *Default*. Indicates that the type of command in the
CommandText property is not known.
adCmdFile (256) Evaluates CommandText as the file name of a persistently
stored Recordset.
adCmdTableDirect (512) Evaluates CommandText as a table name whose columns
are all returned
and ExecuteOptionEnum values:
adAsyncExecute (0x10) Indicates that the command should execute
asynchronously.
adAsyncFetch (0x20) Indicates that the remaining rows after the initial
quantity specified in the CacheSize property should be retrieved
asynchronously.
adAsyncFetchNonBlocking (0x40) Indicates that the main thread never blocks
while retrieving. If the requested row has not been retrieved, the current
row automatically moves to the end of the file.
If you open a Recordset from a Stream containing a persistently stored
Recordset, adAsyncFetchNonBlocking will not have an effect; the operation
will be synchronous and blocking.
adAsynchFetchNonBlocking has no effect when the adCmdTableDirect option is
used to open the Recordset.
adExecuteNoRecords (0x80) Indicates that the command text is a command or
stored procedure that does not return rows (for example, a command that only
inserts data). If any rows are retrieved, they are discarded and not
returned. Always combined with CommandTypeEnum values adCmdText or
adCmdStoredProc.
adExecuteNoRecords can only be passed as an optional parameter to the
Command or Connection Execute method. Using it as an argument to the Command
object CommandType property will generate an error.
adOptionUnspecified (-1) Indicates that the command is unspecified.
hope this helps some Chris--
sgd
--
think safely