|
-
August 23rd, 2002, 08:40 AM
#1
VB/Access Data Validation
I am developing a VB standard exe front end to an Access database. On one of my forms I import data from txt and Excel files. I need to validate the data in these records before loading into the database. Specifically, one of the fields being imported is a required foreign key that I need to validate against the primary key of another table.
The way that I plan to do this is running a SQL query (using ADO) and checking the record count of the resulting recordset. If it is greater than 0, then the field has already been set up and is valid. What other ways are there to validate a specific field against another table? I suppose I could load all valid fields into an array prior to starting the import, then search the array to validate each record. Any suggestions from the gurus?
Also, in this same project. I am using DAO on some forms and ADO on others. Is there any problem with this (other than increasing the overhead associated with the exe)?
Would greatly appreciate any comments. I am still working my way up the learning curve.
SB
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|