this should be easy...



really simple.
the DBA gives you a field called txtEntry.
it's an integer field in sql 2000.

make a form that has the txtEntry field and validate that only integers
are passed thru on that
form when you save it.

well, i tried this.
i used the CompareValidator control.
make it to DataTypeCheck to Integer.

it lets thru
that is ten 9's.
it shouldn't because an integer's max value is

Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 -
1 (2,147,483,647). Storage size is 4 bytes. The SQL-92 synonym for int
is integer

why does it let this pass thru? am i doing something wrong?

then on top of that
if i try to pass
2,147,483,647 it won't work because it has comma's.

there has to be a better way to do this.
help, thx.



S. Justin Gengo [MCP]


Use a range validator instead. With it you can set minimum and maximum
values. It won't allow commas either though. If you really need to allow
commas and check the min/max you'll want to use a regular expression


S. Justin Gengo, MCP
Web Developer / Programmer

"Out of chaos comes order."

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question