07-15-2002, 08:37 PM
Can someone point me in the right direction or (example) for form validation. I have a text box field in a form that connects to an access database. I want to check for numeric numbers only, and also if the record is not found to display a recond not found page instead of
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
07-15-2002, 09:10 PM
Run this asp code to check for numaric numbers.
Dim xC, vC, zC
vC = "1234567890"
For xC = 1 To Len(zC)
If Instr(vC, Mid(zC, xC, 1)) < 1 Then
07-15-2002, 09:12 PM
Then for the database part:
'Run your query first
If rs.EOF or rs.BOF then Response.Redirect("NotFound.aspx")
Change 'rs' to whatever your recordset control name is.
07-15-2002, 09:58 PM
07-16-2002, 08:33 PM
Am I a newbie for asking this?
What are "numaric numbers"?
07-16-2002, 08:41 PM
I think he ment numaric characters/integers.
07-17-2002, 03:22 AM
Morgoth, please limit your posts in this forum to questions about ASP or attempting to help someone with their ASP problem.
07-17-2002, 08:36 AM
Ok Whammy, but alot of this is new to me, and i want to suck up all the info I can so my code and applications will be perfect or close to being that way.
07-17-2002, 03:18 PM
Sorry if I was mistaken, it seemed to me you were being a smart aleck. ;)
MixedString = MixedString.replace(/\D/g,'');
You'd call that function just like a VBScript function. So, in addition to the way Oracleguy showed above, you could also see if something extracted from a database was only numeric like:
If myString <> ExtractNumbers(myString) Then
'It's not numeric!