w3schools    w3Schools
Search W3Schools :
   
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
ADVERTISEMENTS

XML Certification
Download XML editor
Custom Programming
 
Table of contents
ADO Tutorial
ADO HOME
ADO Intro
ADO Connect
ADO Recordset
ADO Display
ADO Query
ADO Sort
ADO Add
ADO Update
ADO Delete
ADO Demo
ADO Speed Up

ADO Objects
ADO Command
ADO Connection
ADO Error
ADO Field
ADO Parameter
ADO Property
ADO Record
ADO Recordset
ADO Stream
ADO DataTypes

ADO Summary

Examples
ADO Examples

Exam
ADO Exam

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Tutorials
W3Schools Forum

Helping W3Schools

 

ADO CreateParameter Method


Command Object Reference Complete Command Object Reference

The CreateParameter method creates and returns a Parameter object containing the specified properties like name, type, direction, size, and value.

Note: This method does not automatically add the new Parameter to the collection. To add the Parameter to the Parameters Collection, use the Append property.

Syntax

Set objparameter=objcommand.CreateParameter
(name,type,direction,size,value)

Parameter Description
name Optional. The name of the Parameter object.
type Optional. One of the DataTypeEnum constants that specifies the data type for the Parameter object. Default is adEmpty. If you choose a variable-length data type, you will also need to specify the Size parameter or the Size property. If you specify adDecimal or adNumeric data type, you must also set the NumericScale and the Precision properties of the Parameter object.
direction Optional. One of the ParameterDirectionEnum constants that defines the direction of the Parameter object. Default is adParamInput.
size Optional. Specifies the length of a variable-length data type, if such a type was declared in the Type parameter. Default is zero.
value Optional. The value of the Parameter object


DataTypeEnum Values

Specifies the data type of a Field, Parameter, or Property object

Constant Value Description
adEmpty 0 No value
adSmallInt 2 A 2-byte signed integer.
adInteger 3 A 4-byte signed integer.
adSingle 4 A single-precision floating-point value.
adDouble 5 A double-precision floating-point value.
adCurrency 6 A currency value
adDate 7 The number of days since December 30, 1899 + the fraction of a day.
adBSTR 8 A null-terminated character string.
adIDispatch 9 A pointer to an IDispatch interface on a COM object. Note: Currently not supported by ADO.
adError 10 A 32-bit error code
adBoolean 11 A boolean value.
adVariant 12 An Automation Variant. Note: Currently not supported by ADO.
adIUnknown 13 A pointer to an IUnknown interface on a COM object. Note: Currently not supported by ADO.
adDecimal 14 An exact numeric value with a fixed precision and scale.
adTinyInt 16 A 1-byte signed integer.
adUnsignedTinyInt 17 A 1-byte unsigned integer.
adUnsignedSmallInt 18 A 2-byte unsigned integer.
adUnsignedInt 19 A 4-byte unsigned integer.
adBigInt 20 An 8-byte signed integer.
adUnsignedBigInt 21 An 8-byte unsigned integer.
adFileTime 64 The number of 100-nanosecond intervals since January 1,1601
adGUID 72 A globally unique identifier (GUID)
adBinary 128 A binary value.
adChar 129 A string value.
adWChar 130 A null-terminated Unicode character string.
adNumeric 131 An exact numeric value with a fixed precision and scale.
adUserDefined 132 A user-defined variable.
adDBDate 133 A date value (yyyymmdd).
adDBTime 134 A time value (hhmmss).
adDBTimeStamp 135 A date/time stamp (yyyymmddhhmmss plus a fraction in billionths).
adChapter 136 A 4-byte chapter value that identifies rows in a child rowset
adPropVariant 138 An Automation PROPVARIANT.
adVarNumeric 139 A numeric value (Parameter object only).
adVarChar 200 A string value (Parameter object only).
adLongVarChar 201 A long string value.
adVarWChar 202 A null-terminated Unicode character string.
adLongVarWChar 203 A long null-terminated Unicode string value.
adVarBinary 204 A binary value (Parameter object only).
adLongVarBinary 205 A long binary value.
AdArray 0x2000 A flag value combined with another data type constant. Indicates an array of that other data type.

ParameterDirectionEnum Values

Specifies whether the Parameter represents an input parameter, an output parameter, both an input and an output parameter, or the return value from a stored procedure.

Constant Value Description
adParamUnknown 0 Direction is unknown
adParamInput 1 Input parameter
adParamOutput 2 Output parameter
adParamInputOutput 3 Both input and output parameter
adParamReturnValue 4 Return value


Command Object Reference Complete Command Object Reference


Altova® XMLSpy® - The world's best-selling XML editor!

Whether you're new to XML or already an advanced user, the user-friendly views and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to meet your XML and Web services development needs from start to finish.

  • XML editor
  • Graphical XML Schema / DTD editors
  • XSLT 1.0/2.0 editor, debugger, profiler
  • XQuery editor, debugger, profiler
  • Support for Office Open XML (OOXML)
  • Graphical WSDL editor & SOAP debugger
  • Java, C#, C++ code generation
  • And much more!

Download a fully functional free 30-day trial today!


 
WEB HOSTING
Shopping Cart
ASP.NET
Shopping Cart
$15 Domain Name
Registration
Save $20 / year!
Buy UK Domain Names
Register Domain Names
Cheap Domain Names
Cheap Web Hosting
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
WEB BUILDING
Website Templates
Flash Templates
Website Builder
Internet Business Opportunity
Custom Programming
FREE Trial or Demo
Web Content Manager
Forms,Web Alerts,RSS
Download XML editor
FREE Flash Website
FREE Web Templates
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification

Home HOME or Top of Page Validate   Validate   W3C-WAI level A conformance icon Printer Friendly  Printer Friendly

W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright 1999-2009 by Refsnes Data. All Rights Reserved.