Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validating Data
Message
From
08/08/1999 21:00:26
 
 
To
07/08/1999 01:23:20
General information
Forum:
Visual Basic
Category:
Other
Title:
Miscellaneous
Thread ID:
00251008
Message ID:
00251323
Views:
10
>I am a FoxPro Programmer and currently working in VFP 6.0
>But, I am trying a small appl. in VB 5.0 in that I want to
>validate the data entered into TextBox. In FoxPro we can use
>SEEK() function for checking data. But, I think there is no such
>function in VB.
>So, How should I validate the Data ? ? ?
>
>Any Ideas.
>

Well, SEEK() only tells you one aspect of validating the data - Whether the entry currently exists in a table. If SEEK() is false then the record does not exist.

As far SEEK() in VB you can approach this in several ways:

1) Do a "SELECT * FROM table WHERE field = text.value" into a recordset and see what you get. If no records are returned, then...

OR

2) SELECT all records and iterate through the recordset until you either find or do not find what you are looking for.


The first is faster for obvious reasons.

Unless you're looking for some other form of validation, like field type validation, then this should take care of your SEEK() type validation...

Michael
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform