>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only