Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DefinedSize property 1

Status
Not open for further replies.

Ravala

Programmer
Jan 28, 2004
88
US
How can I use the DifinedSize Property of Recordset ADO Object for numeric fields.
For ex. I have in oracle table field size number(3),
I want to prevent a user type in more than 3 digits.
Anywhere, after procedure:
txtFiels.MaxLength=objRS("CODE").DefinedSize
still can type 10 digits.

Thanks.
 
use
.Precision
for numeric fields
and
.DefinedSize for alpha

as an example
?RS.Fields("campos_cod_postal").DefinedSize
19
?RS.Fields("campos_cod_postal").Precision
1

Field is defined as
numeric(1)
ON table design (SQL Server 2000, enterprise manager)
it show 1 as precision and 5 as lenght
SQL is
[CAMPOS_COD_POSTAL] [numeric](1, 0) NULL ,

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top