Tutoriais ASP

ASP HOME

Tutorial WP

Introdução às páginas da Web Navalha de páginas da Web Layout de páginas da Web Pastas de páginas da Web Páginas da Web globais Formulários de páginas da Web Objetos de páginas da Web Arquivos de páginas da Web Bancos de dados de páginas da Web Assistentes de páginas da Web Páginas da Web WebGrid Gráficos de páginas da Web E-mail de páginas da Web Segurança de páginas da Web Publicação de páginas da Web Exemplos de páginas da Web Aulas de páginas da Web

Máquina de barbear ASP.NET

Introdução à navalha Sintaxe Razor Variáveis ​​Razor C# Loops Razor C# Razor C# Logic Variáveis ​​Razor VB Loops Razor VB Lógica do Razor VB

ASP Clássico

Introdução ASP Sintaxe ASP Variáveis ​​ASP Procedimentos ASP Condicionais ASP Loop ASP Formulários ASP Cookies ASP Sessão ASP Aplicativo ASP ASP #incluir ASP Global.asa ASP AJAX e-mail ASP Exemplos ASP

Referência ASP

Funções ASP VB Palavras-chave ASP VB Resposta ASP Solicitação ASP Aplicativo ASP Sessão ASP Servidor ASP Erro ASP Sistema de arquivos ASP Fluxo de texto ASP Unidade ASP Arquivo ASP Pasta ASP Dicionário ASP ASP AdRotator ASP BrowserCap Vinculação de conteúdo ASP Rotador de conteúdo ASP Referência Rápida ASP

Tutorial ADO

Introdução ao ADO ADO Connect Conjunto de registros ADO Exibição ADO Consulta ADO ADO Sort Adicionar ADO Atualização ADO Excluir ADO Demonstração ADO Aceleração ADO

Objetos ADO

Comando ADO Conexão ADO Erro ADO Campo ADO Parâmetro ADO Propriedade ADO Registro ADO Conjunto de registros ADO Fluxo ADO Tipos de dados ADO

Propriedade do tipo ADO


❮ Referência Completa do Objeto de Campo

A propriedade Type define ou retorna um valor DataTypeEnum que indica o tipo de um objeto Parameter, Field ou Property.

Object Description of the Type Property
Parameter The Type property has read/write permissions on a Parameter object
Field

The Type property is read/write, with one exception; for new Field objects that are added to the Fields collection of a Record, this property is read-only before the Value property has been set and before the provider has called the Update method of the Fields collection

Property The Type property is read-only for a Property object

Sintaxe

objectname.Type

Exemplo - Para um objeto Field

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"

set rs = Server.CreateObject("ADODB.Recordset")
rs.open "Select * from orders", conn

response.write(rs.Fields(0).Type)

rs.Close
conn.close
%>

Exemplo - Para um objeto de parâmetro

<%
set comm=Server.CreateObject("ADODB.Command")
set para=Server.CreateObject("ADODB.Parameter")

para.Type=adVarChar
para.Size=25
para.Direction=adParamInput
para.Value=varfname

comm.Parameters.Append para
%>

Exemplo - Para um objeto Propriedade

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"

set rs = Server.CreateObject("ADODB.Recordset")
rs.open "Select * from orders", conn

set prop=Server.CreateObject("ADODB.Property")

'Display the property attributes of the Orders Table
for each prop in rs.Properties
  response.write("Attr:" & prop.Attributes & "<br>")
  response.write("Name:" & prop.Name & "<br>")
  response.write("Value:" & prop.Value & "<br>")
next

rs.close
conn.close
set rs=nothing
set conn=nothing
%>

Valores DataTypeEnum

Especifica o tipo de dados de um objeto Field, Parameter ou Property

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.

❮ Referência Completa do Objeto de Campo