Ir para conteúdo
Fórum Script Brasil
  • 0

Verificando campo vazio


Ronaldo Lanhellas

Pergunta

5 respostass a esta questão

Posts Recomendados

  • 0

Meu amigo, voce precisa ler mais sobre o delphi

no help voce vai encontrar isso, sobre a função VarType

Returns the type code of a specified Variant.

Unit

System

Category

Variant support routines

function VarType(const V: Variant): Integer;

Description

VarType returns the type code of the given Variant. The resulting value is constructed from the following constants declared in the System unit.

const

varEmpty = $0000;

varNull = $0001;

varSmallint = $0002;

varInteger = $0003;

varSingle = $0004;

varDouble = $0005;

varCurrency = $0006;

varDate = $0007;

varOleStr = $0008;

varDispatch = $0009;

varError = $000A;

varBoolean = $000B;

varVariant = $000C;

varUnknown = $000D;

varByte = $0011;

varStrArg = $0048;

varString = $0100;

varAny = $0101;

varTypeMask = $0FFF;

varArray = $2000;

varByRef = $4000;

The lower twelve bits of a Variant type code (the bits defined by the varTypeMask bit mask) define the type of the Variant. The varArray bit is set if the Variant is an array of the given type. The varByRef bit is set if the Variant is a reference to a value of the given type as opposed to an actual value.

The following table describes the meaning of each of the Variant type codes.

VarType Contents of Variant

varEmpty The Variant is Unassigned.

varNull The Variant is Null.

varSmallint 16-bit signed integer (type Smallint).

varInteger 32-bit signed integer (type Integer).

varSingle Single-precision floating-point value (type Single).

varDouble Double-precision floating-point value (type Double).

varCurrency Currency floating-point value (type Currency).

varDate Date and time value (type TDateTime).

varOleStr Reference to a dynamically allocated UNICODE string.

varDispatch Reference to an Automation object (an IDispatch interface pointer).

varError Operating system error code.

varBoolean 16-bit boolean (type WordBool).

varVariant A Variant.

varUnknown Reference to an unknown OLE object (an IUnknown interface pointer).

varByte A Byte

varStrArg COM-compatible string.

varString Reference to a dynamically allocated string. (not COM compatible)

varAny A CORBA Any value.

The value returned by VarType corresponds to the VType field of a TVarData record.

The type of a Variant can be changed using VarAsType or VarCast.

abraço

Link para o comentário
Compartilhar em outros sites

  • 0

exatamente ... e veja que voce pode testar qualquer tipo que esteja em sua tabela

varEmpty....... The Variant is Unassigned.

varNull ...... The Variant is Null.

varSmallint ...... 16-bit signed integer (type Smallint).

varInteger...... 32-bit signed integer (type Integer).

etc...

abraço

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,9k
×
×
  • Criar Novo...